Hi, On Monday 21 January 2013 19:35:38 Chen Gang wrote: > for NUL terminated string, better notice '\0' in the end. > > Signed-off-by: Chen Gang <gang.chen@xxxxxxxxxxx> Thank you for the patch. I've applied it to my tree. > --- > drivers/usb/gadget/uvc_v4l2.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/gadget/uvc_v4l2.c b/drivers/usb/gadget/uvc_v4l2.c > index 2ca9386..a9934c7 100644 > --- a/drivers/usb/gadget/uvc_v4l2.c > +++ b/drivers/usb/gadget/uvc_v4l2.c > @@ -178,9 +178,9 @@ uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, > void *arg) struct v4l2_capability *cap = arg; > > memset(cap, 0, sizeof *cap); > - strncpy(cap->driver, "g_uvc", sizeof(cap->driver)); > - strncpy(cap->card, cdev->gadget->name, sizeof(cap->card)); > - strncpy(cap->bus_info, dev_name(&cdev->gadget->dev), > + strlcpy(cap->driver, "g_uvc", sizeof(cap->driver)); > + strlcpy(cap->card, cdev->gadget->name, sizeof(cap->card)); > + strlcpy(cap->bus_info, dev_name(&cdev->gadget->dev), > sizeof cap->bus_info); > cap->version = DRIVER_VERSION_NUMBER; > cap->capabilities = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html