[media] timblogiw: too large value for strncpy()
authorDan Carpenter <error27@gmail.com>
Mon, 20 Dec 2010 12:53:16 +0000 (09:53 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 29 Dec 2010 10:17:04 +0000 (08:17 -0200)
This is a copy and paste error.  It should be using sizeof(cap->driver)
instead of sizeof(cap->card).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Richard Rojförs <richard.rojfors@pelagicore.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/timblogiw.c

index cf48aa934b8cfabcec89a0707a2c06aedcaa1d85..700c08aca6c67caf972bf16a973af743e50243a8 100644 (file)
@@ -241,7 +241,7 @@ static int timblogiw_querycap(struct file *file, void  *priv,
        dev_dbg(&vdev->dev, "%s: Entry\n",  __func__);
        memset(cap, 0, sizeof(*cap));
        strncpy(cap->card, TIMBLOGIWIN_NAME, sizeof(cap->card)-1);
-       strncpy(cap->driver, DRIVER_NAME, sizeof(cap->card)-1);
+       strncpy(cap->driver, DRIVER_NAME, sizeof(cap->driver) - 1);
        strlcpy(cap->bus_info, vdev->name, sizeof(cap->bus_info));
        cap->version = TIMBLOGIW_VERSION_CODE;
        cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |