From: Dan Carpenter <error27@gmail.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: "Richard Röjfors" <richard.rojfors@pelagicore.com>,
linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch -next] [media] timblogiw: too large value for strncpy()
Date: Mon, 20 Dec 2010 12:53:16 +0000 [thread overview]
Message-ID: <20101220125316.GW1936@bicker> (raw)
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 |
reply other threads:[~2010-12-20 12:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101220125316.GW1936@bicker \
--to=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=richard.rojfors@pelagicore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).