Files
linux/fs
Geert Uytterhoeven e17ce2ec38 sysfs: sysfs_pathname/sysfs_add_one: Use strlcat() instead of strcat()
commit 66081a7251 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>
2012-10-31 09:51:35 -07:00
..
2011-05-19 16:55:28 +09:30
2011-07-17 23:20:29 -04:00
2012-09-14 10:00:50 -07:00
2011-11-11 09:35:59 -08:00
2011-06-20 17:53:24 -05:00
2011-07-17 23:21:35 -04:00
2011-07-06 12:15:16 -07:00
2012-09-14 10:00:37 -07:00
2012-04-27 09:51:09 -07:00
2011-05-26 10:01:43 -06:00