Re: [PATCH] IB/cma: use strlcpy() instead of strncpy()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 12, 2018 at 03:56:05PM +0800, Xiongfeng Wang wrote:
> From: Xiongfeng Wang <xiongfeng.wang@xxxxxxxxxx>
> 
> gcc-8 reports
> 
> drivers/infiniband/core/cma_configfs.c: In function 'make_cma_dev':
> ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified
> bound 64 equals destination size [-Wstringop-truncation]
> 
> We need to use strlcpy() to make sure the string is nul-terminated.
> 
> Signed-off-by: Xiongfeng Wang <xiongfeng.wang@xxxxxxxxxx>
> Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
>  drivers/infiniband/core/cma_configfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to rdma for-next, thanks

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux