aboutsummaryrefslogtreecommitdiff
path: root/drivers/vhost/net.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2012-09-29 22:23:19 +0200
committerBen Hutchings <ben@decadent.org.uk>2012-10-30 23:26:59 +0000
commit6a026352765b0830d1e6f1fa2a8c1c0499fc1508 (patch)
tree855e4f263e3e39e3c4cd659943d4b9b3b3c0702a /drivers/vhost/net.c
parent9f9f1c8ccd02d7eb704105833f959a2b96876544 (diff)
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> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/vhost/net.c')
0 files changed, 0 insertions, 0 deletions