kernel_optimize_test/fs/sysfs
Geert Uytterhoeven 66081a7251 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>
2012-10-24 15:57:14 -07:00
..
bin.c sysfs: Push file_update_time() into bin_page_mkwrite() 2012-07-31 01:02:47 +04:00
dir.c sysfs: sysfs_pathname/sysfs_add_one: Use strlcat() instead of strcat() 2012-10-24 15:57:14 -07:00
file.c sysfs: Complain bitterly about attempts to remove files from nonexistent directories. 2012-01-24 12:12:32 -08:00
group.c sysfs: Prevent crash on unset sysfs group attributes 2012-04-10 14:48:51 -07:00
inode.c avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Makefile
mount.c VFS: Pass mount flags to sget() 2012-07-14 16:38:34 +04:00
symlink.c sysfs: Fix comment typo "sysf_create_link". 2012-09-04 16:11:31 -07:00
sysfs.h sysfs: switch to ->s_d_op and ->d_release() 2012-07-14 16:35:06 +04:00