All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch -next] [media] timblogiw: too large value for strncpy()
@ 2010-12-20 12:53 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-12-20 12:53 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Richard Röjfors, linux-media, kernel-janitors

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>

diff --git a/drivers/media/video/timblogiw.c b/drivers/media/video/timblogiw.c
index cf48aa9..ef1b7a5 100644
--- a/drivers/media/video/timblogiw.c
+++ b/drivers/media/video/timblogiw.c
@@ -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 |

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [patch -next] [media] timblogiw: too large value for strncpy()
@ 2010-12-20 12:53 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-12-20 12:53 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Richard Röjfors, linux-media, kernel-janitors

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>

diff --git a/drivers/media/video/timblogiw.c b/drivers/media/video/timblogiw.c
index cf48aa9..ef1b7a5 100644
--- a/drivers/media/video/timblogiw.c
+++ b/drivers/media/video/timblogiw.c
@@ -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 |

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-20 12:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-20 12:53 [patch -next] [media] timblogiw: too large value for strncpy() Dan Carpenter
2010-12-20 12:53 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.