author: Stefan Richter <stefanr@s5r6.in-berlin.de> 2014-11-19 11:52:00 +0100
committer: Stefan Richter <stefanr@s5r6.in-berlin.de> 2014-12-10 20:53:02 +0100
commit: 0238507b951857360461b0635111e7376ffd44d1
parent: 51b04d59c27430a57c347b55478415c342009035
Commit Summary:
Diffstat:
1 file changed, 3 insertions, 0 deletions
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index 2c6d5e118ac1..f9e3aee6a211 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -115,6 +115,9 @@ static int textual_leaf_to_string(const u32 *block, char *buf, size_t size)
*
* The string is taken from a minimal ASCII text descriptor leaf after
* the immediate entry with @key. The string is zero-terminated.
+ * An overlong string is silently truncated such that it and the
+ * zero byte fit into @size.
+ *
* Returns strlen(buf) or a negative error code.
*/
int fw_csr_string(const u32 *directory, int key, char *buf, size_t size)