From: "Németh Márton" <nm127@freemail.hu>
To: Jean-Francois Moine <moinejf@free.fr>,
V4L Mailing List <linux-media@vger.kernel.org>
Subject: [PATCH] gspca pac7302/pac7311: fix buffer overrun
Date: Wed, 04 Nov 2009 23:38:42 +0100 [thread overview]
Message-ID: <4AF20272.7040104@freemail.hu> (raw)
From: Márton Németh <nm127@freemail.hu>
The reg_w_seq() function expects the sequence length in entries
and not in bytes. One entry in init_7302 and init_7311 is two
bytes and not one.
Signed-off-by: Márton Németh <nm127@freemail.hu>
---
diff -upr a/drivers/media/video/gspca/pac7302.c b/drivers/media/video/gspca/pac7302.c
--- a/drivers/media/video/gspca/pac7302.c 2009-11-05 00:31:36.000000000 +0100
+++ b/drivers/media/video/gspca/pac7302.c 2009-11-05 00:32:50.000000000 +0100
@@ -592,7 +592,7 @@ static void sethvflip(struct gspca_dev *
/* this function is called at probe and resume time for pac7302 */
static int sd_init(struct gspca_dev *gspca_dev)
{
- reg_w_seq(gspca_dev, init_7302, sizeof init_7302);
+ reg_w_seq(gspca_dev, init_7302, sizeof(init_7302)/2);
return 0;
}
diff -upr a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c
--- a/drivers/media/video/gspca/pac7311.c 2009-11-04 23:28:31.000000000 +0100
+++ b/drivers/media/video/gspca/pac7311.c 2009-11-05 00:33:08.000000000 +0100
@@ -490,7 +490,7 @@ static void sethvflip(struct gspca_dev *
/* this function is called at probe and resume time for pac7311 */
static int sd_init(struct gspca_dev *gspca_dev)
{
- reg_w_seq(gspca_dev, init_7311, sizeof init_7311);
+ reg_w_seq(gspca_dev, init_7311, sizeof(init_7311)/2);
return 0;
}
next reply other threads:[~2009-11-04 22:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-04 22:38 Németh Márton [this message]
2009-11-05 11:19 ` [PATCH] gspca pac7302/pac7311: fix buffer overrun Jean-Francois Moine
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=4AF20272.7040104@freemail.hu \
--to=nm127@freemail.hu \
--cc=linux-media@vger.kernel.org \
--cc=moinejf@free.fr \
/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 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.