diff mbox

gspca pac7302/pac7311: fix buffer overrun

Message ID 4AF20272.7040104@freemail.hu (mailing list archive)
State Accepted
Headers show

Commit Message

Németh Márton Nov. 4, 2009, 10:38 p.m. UTC
None
diff mbox

Patch

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;
 }