projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c60503c
)
V4L/DVB (13875): gspca - vc032x: Fix a possible crash with the vc0321 bridge.
author
Jean-Francois Moine
<moinejf@free.fr>
Sat, 26 Dec 2009 11:41:17 +0000
(08:41 -0300)
committer
Mauro Carvalho Chehab
<mchehab@redhat.com>
Sun, 17 Jan 2010 13:31:36 +0000
(11:31 -0200)
The frame pointer returned by get_i_frame may be NULL when the application
is too slow.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/vc032x.c
patch
|
blob
|
history
diff --git
a/drivers/media/video/gspca/vc032x.c
b/drivers/media/video/gspca/vc032x.c
index c090efcd80454e605e3935cbd3ef2231300e5dee..71921c8784246c9eddb993daaf87eafbfd065a09 100644
(file)
--- a/
drivers/media/video/gspca/vc032x.c
+++ b/
drivers/media/video/gspca/vc032x.c
@@
-3009,6
+3009,10
@@
static void sd_pkt_scan(struct gspca_dev *gspca_dev,
int l;
frame = gspca_get_i_frame(gspca_dev);
+ if (frame == NULL) {
+ gspca_dev->last_packet_type = DISCARD_PACKET;
+ return;
+ }
l = frame->data_end - frame->data;
if (len > frame->v4l2_buf.length - l)
len = frame->v4l2_buf.length - l;