summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/uvc/uvc_ctrl.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@skynet.be>2009-01-08 18:05:11 +0100
committerLaurent Pinchart <laurent.pinchart@skynet.be>2009-01-08 18:05:11 +0100
commit9a4018764037eef8071fe8fd4815f64933c1d646 (patch)
tree79f7ef4516df1d643ba8ff4987be6dbd254548d9 /linux/drivers/media/video/uvc/uvc_ctrl.c
parent8b8d5d53029339f50706bc1a3b099cedae2abf6a (diff)
downloadmediapointer-dvb-s2-9a4018764037eef8071fe8fd4815f64933c1d646.tar.gz
mediapointer-dvb-s2-9a4018764037eef8071fe8fd4815f64933c1d646.tar.bz2
uvcvideo: replace strn{cpy,cat} with strl{cpy,cat}.
From: Laurent Pinchart <laurent.pinchart@skynet.be> strncpy is unsafe as it doesn't append a terminating NUL character when the source string doesn't fit in the destination buffer. Replace it with strlcpy. strncat is misused as its size argument refers to the source string, not the destination buffer. Replace it with strlcat. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Diffstat (limited to 'linux/drivers/media/video/uvc/uvc_ctrl.c')
-rw-r--r--linux/drivers/media/video/uvc/uvc_ctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/uvc/uvc_ctrl.c b/linux/drivers/media/video/uvc/uvc_ctrl.c
index f3f36f625..7774ce6b5 100644
--- a/linux/drivers/media/video/uvc/uvc_ctrl.c
+++ b/linux/drivers/media/video/uvc/uvc_ctrl.c
@@ -788,7 +788,7 @@ int uvc_query_v4l2_ctrl(struct uvc_video_device *video,
memset(v4l2_ctrl, 0, sizeof *v4l2_ctrl);
v4l2_ctrl->id = mapping->id;
v4l2_ctrl->type = mapping->v4l2_type;
- strncpy(v4l2_ctrl->name, mapping->name, sizeof v4l2_ctrl->name);
+ strlcpy(v4l2_ctrl->name, mapping->name, sizeof v4l2_ctrl->name);
v4l2_ctrl->flags = 0;
if (!(ctrl->info->flags & UVC_CONTROL_SET_CUR))