Re: [PATCH] mptfusion: use strlcpy() instead of strncpy()

2018-01-16 Thread Xiongfeng Wang
On 2018/1/16 3:34, Andy Shevchenko wrote: > On Fri, Jan 12, 2018 at 5:09 PM, Bart Van Assche > wrote: >> On Fri, 2018-01-12 at 15:45 +0200, Andy Shevchenko wrote: >>> On Fri, Jan 12, 2018 at 1:46 PM, Wang wrote: > >>> This one is false

Re: [PATCH] mptfusion: use strlcpy() instead of strncpy()

2018-01-15 Thread Andy Shevchenko
On Fri, Jan 12, 2018 at 5:09 PM, Bart Van Assche wrote: > On Fri, 2018-01-12 at 15:45 +0200, Andy Shevchenko wrote: >> On Fri, Jan 12, 2018 at 1:46 PM, Wang wrote: >> This one is false positive. >> > + strlcpy (karg.name, ioc->name,

Re: [PATCH] mptfusion: use strlcpy() instead of strncpy()

2018-01-12 Thread Bart Van Assche
On Fri, 2018-01-12 at 15:45 +0200, Andy Shevchenko wrote: > On Fri, Jan 12, 2018 at 1:46 PM, Wang wrote: > > > > - strncpy (karg->driverVersion, MPT_LINUX_PACKAGE_NAME, > > MPT_IOCTL_VERSION_LENGTH); > > -

Re: [PATCH] mptfusion: use strlcpy() instead of strncpy()

2018-01-12 Thread Andy Shevchenko
On Fri, Jan 12, 2018 at 1:46 PM, Xiongfeng Wang wrote: > From: Xiongfeng Wang > > drivers/message/fusion/mptctl.c: In function '__mptctl_ioctl.isra.3': > ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified > bound 12 equals

[PATCH] mptfusion: use strlcpy() instead of strncpy()

2018-01-12 Thread Xiongfeng Wang
From: Xiongfeng Wang drivers/message/fusion/mptctl.c: In function '__mptctl_ioctl.isra.3': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 12 equals destination size [-Wstringop-truncation] The compiler requires that the destination size