lkml.org 
[lkml]   [2018]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] media: media-device: use strlcpy() instead of strncpy()
On Mon, Jan 08, 2018 at 08:40:59PM +0800, Xiongfeng Wang wrote:
> From: Xiongfeng Wang <xiongfeng.wang@linaro.org>
>
> gcc-8 reports
>
> drivers/media/media-device.c: In function 'media_device_get_topology':
> ./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 dest string is nul-terminated.
>
> Signed-off-by: Xiongfeng Wang <xiongfeng.wang@linaro.org>

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

--
Sakari Ailus
e-mail: sakari.ailus@iki.fi

\
 
 \ /
  Last update: 2018-01-14 23:17    [W:0.050 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site