linux-stable/fs/configfs
Guenter Roeck 56d10194be 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:24:15 +01:00
..
configfs_internal.h configfs: implement binary attributes 2016-01-04 12:31:46 +01:00
dir.c configfs: fix registered group removal 2018-09-26 08:38:10 +02:00
file.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
inode.c fs: Replace current_fs_time() with current_time() 2016-09-27 21:06:22 -04:00
item.c configfs: Introduce config_item_get_unless_zero() 2017-06-12 13:20:20 +02:00
Kconfig configfs: change depends -> select SYSFS 2011-01-16 21:22:29 +00:00
Makefile
mount.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
symlink.c configfs: replace strncpy with memcpy 2018-11-21 09:24:15 +01:00