aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2012-09-29 22:23:19 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-31 09:51:35 -0700
commite17ce2ec38fd766e8f9707701e47f4332d8bb630 (patch)
tree609a59ea45aff2c2a71f4046e5801c84b49ab7f3 /fs/proc
parent910e425b29da7b601a99f49e81da666ab8ed5920 (diff)
downloadkernel_samsung_tuna-e17ce2ec38fd766e8f9707701e47f4332d8bb630.zip
kernel_samsung_tuna-e17ce2ec38fd766e8f9707701e47f4332d8bb630.tar.gz
kernel_samsung_tuna-e17ce2ec38fd766e8f9707701e47f4332d8bb630.tar.bz2
sysfs: sysfs_pathname/sysfs_add_one: Use strlcat() instead of strcat()
commit 66081a72517a131430dcf986775f3268aafcb546 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/proc')
0 files changed, 0 insertions, 0 deletions