Skip to content

Commit

Permalink
V4L/DVB (13325): gspca - pac7302/pac7311: Fix buffer overrun.
Browse files Browse the repository at this point in the history
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: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Marton Nemeth authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent 4f7309e commit 8337fc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/media/video/gspca/pac7302.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/gspca/pac7311.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8337fc3

Please sign in to comment.