linux-brain/fs/configfs
Guenter Roeck 8f1756ad8b 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:26:03 +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: implement binary attributes 2016-01-04 12:31:46 +01:00
dir.c configfs: fix registered group removal 2018-09-26 08:36:38 +02:00
file.c configfs: Return -EFBIG from configfs_write_bin_file. 2016-09-16 12:58:28 +02:00
inode.c fs: Replace current_fs_time() with current_time() 2016-09-27 21:06:22 -04:00
item.c configfs: switch ->default groups to a linked list 2016-03-06 16:11:24 +01:00
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:26:03 +01:00