projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b11b2e1
)
drivers/usb/gadget: using strlcpy instead of strncpy
author
Chen Gang
<gang.chen@asianux.com>
Sat, 2 Feb 2013 07:48:54 +0000
(15:48 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 6 Feb 2013 19:38:13 +0000
(11:38 -0800)
for NUL terminated string, better notice '\0' in the end.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/f_uvc.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/gadget/f_uvc.c
b/drivers/usb/gadget/f_uvc.c
index 5b629876941bc282d1ceea95e3caac4c2cdd6cbf..92efd6ec48afde2333f2edf2a6000d70bbfbd098 100644
(file)
--- a/
drivers/usb/gadget/f_uvc.c
+++ b/
drivers/usb/gadget/f_uvc.c
@@
-16,6
+16,7
@@
#include <linux/fs.h>
#include <linux/list.h>
#include <linux/mutex.h>
+#include <linux/string.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
#include <linux/usb/video.h>
@@
-419,7
+420,7
@@
uvc_register_video(struct uvc_device *uvc)
video->parent = &cdev->gadget->dev;
video->fops = &uvc_v4l2_fops;
video->release = video_device_release;
- str
n
cpy(video->name, cdev->gadget->name, sizeof(video->name));
+ str
l
cpy(video->name, cdev->gadget->name, sizeof(video->name));
uvc->vdev = video;
video_set_drvdata(video, uvc);