diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-09-29 22:23:19 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-24 15:57:14 -0700 |
commit | 66081a72517a131430dcf986775f3268aafcb546 (patch) | |
tree | 4ca237f799ac01827ff8bb55cf388121b7d14f9e /Documentation/firmware_class | |
parent | c0d2af637863940b1a4fb208224ca7acb905c39f (diff) | |
download | linux-66081a72517a131430dcf986775f3268aafcb546.tar.gz linux-66081a72517a131430dcf986775f3268aafcb546.tar.bz2 linux-66081a72517a131430dcf986775f3268aafcb546.zip |
sysfs: sysfs_pathname/sysfs_add_one: Use strlcat() instead of strcat()
The warning check for duplicate sysfs entries can cause a buffer overflow
when printing the warning, as strcat() doesn't check buffer sizes.
Use strlcat() instead.
Since strlcat() doesn't return a pointer to the passed buffer, unlike
strcat(), I had to convert the nested concatenation in sysfs_add_one() to
an admittedly more obscure comma operator construct, to avoid emitting code
for the concatenation if CONFIG_BUG is disabled.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/firmware_class')
0 files changed, 0 insertions, 0 deletions