提交 8337fc30 编写于 作者: M Marton Nemeth 提交者: Mauro Carvalho Chehab

V4L/DVB (13325): gspca - pac7302/pac7311: Fix buffer overrun.

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: NMarton Nemeth <nm127@freemail.hu>
Signed-off-by: NJean-Francois Moine <moinejf@free.fr>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 4f7309e2
......@@ -571,7 +571,7 @@ static void sethvflip(struct gspca_dev *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;
}
......
......@@ -469,7 +469,7 @@ static void sethvflip(struct gspca_dev *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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册