Re: [PATCH] btrfs: use correct string length

2018-01-09 Thread David Sterba
On Mon, Jan 08, 2018 at 07:51:22PM +0800, Xiongfeng Wang wrote: > From: Xiongfeng Wang > > gcc-8 reports > > fs/btrfs/ioctl.c: In function 'btrfs_ioctl': > ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified > bound 1024 equals destination size

[PATCH] btrfs: use correct string length

2018-01-08 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports fs/btrfs/ioctl.c: In function 'btrfs_ioctl': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 1024 equals destination size [-Wstringop-truncation] We need one less byte or call strlcpy() to make it a