linux-brain/fs/configfs
Guenter Roeck 9546d6609e configfs: replace strncpy with memcpy
commit 1823342a1f upstream.

gcc 8.1.0 complains:

fs/configfs/symlink.c:67:3: warning:
	'strncpy' output truncated before terminating nul copying as many
	bytes from a string as its length
fs/configfs/symlink.c: In function 'configfs_get_link':
fs/configfs/symlink.c:63:13: note: length computed here

Using strncpy() is indeed less than perfect since the length of data to
be copied has already been determined with strlen(). Replace strncpy()
with memcpy() to address the warning and optimize the code a little.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu@cybertrust.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-21 09:27:44 +01:00
..
Kconfig configfs: change depends -> select SYSFS 2011-01-16 21:22:29 +00:00
Makefile [PATCH] configfs: User-driven configuration filesystem 2006-01-03 11:45:28 -08:00
configfs_internal.h configfs_add_file: fold into its sole caller 2015-02-17 22:16:46 -05:00
dir.c configfs: allow dynamic group creation 2015-11-20 16:17:32 -08:00
file.c configfs: remove old API 2015-10-13 22:17:57 -07:00
inode.c make simple_positive() public 2015-06-23 18:02:01 -04:00
item.c configfs: fix kernel infoleak through user-controlled format string 2015-07-17 16:39:53 -07:00
mount.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2015-07-03 15:20:57 -07:00
symlink.c configfs: replace strncpy with memcpy 2018-11-21 09:27:44 +01:00