* [patch -next] [media] timblogiw: too large value for strncpy()
@ 2010-12-20 12:53 Dan Carpenter
0 siblings, 0 replies; only message 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] only message in thread
only message in thread, other threads:[~2010-12-20 12:53 UTC | newest]
Thread overview: (only message) (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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).