aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/vc032x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/vc032x.c')
-rw-r--r--drivers/media/video/gspca/vc032x.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c
index c090efcd8045..71921c878424 100644
--- 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,
3009 int l; 3009 int l;
3010 3010
3011 frame = gspca_get_i_frame(gspca_dev); 3011 frame = gspca_get_i_frame(gspca_dev);
3012 if (frame == NULL) {
3013 gspca_dev->last_packet_type = DISCARD_PACKET;
3014 return;
3015 }
3012 l = frame->data_end - frame->data; 3016 l = frame->data_end - frame->data;
3013 if (len > frame->v4l2_buf.length - l) 3017 if (len > frame->v4l2_buf.length - l)
3014 len = frame->v4l2_buf.length - l; 3018 len = frame->v4l2_buf.length - l;