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 positive. > > + strlcpy (karg.name, ioc->na

[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 should

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

2018-01-08 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports drivers/message/fusion/mptbase.c: In function 'mpt_display_event_info': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 100 equals destination size [-Wstringop-truncation] We need to use strlcpy() to make sur