summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-12-11 09:02:18 +0100
committerJean-Francois Moine <moinejf@free.fr>2008-12-11 09:02:18 +0100
commitd2c689d834f3c29dd15a07d5d421fe6c3124880e (patch)
tree33df1533aad1e975476937249b0d3d453dc28977 /linux
parentcd7fe8de6217a244b405e379bb843357c872fc78 (diff)
downloadmediapointer-dvb-s2-d2c689d834f3c29dd15a07d5d421fe6c3124880e.tar.gz
mediapointer-dvb-s2-d2c689d834f3c29dd15a07d5d421fe6c3124880e.tar.bz2
gspca - vc032x: Fix frame overflow errors with vc0321.
From: Hans de Goede <hdegoede@redhat.com> The vc0321 sends some additional data after sending the complete frame, we ignore this. Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/gspca/vc032x.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux/drivers/media/video/gspca/vc032x.c b/linux/drivers/media/video/gspca/vc032x.c
index 15dc660a5..fb05d866f 100644
--- a/linux/drivers/media/video/gspca/vc032x.c
+++ b/linux/drivers/media/video/gspca/vc032x.c
@@ -2291,6 +2291,12 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
data, len);
return;
}
+
+ /* The vc0321 sends some additional data after sending the complete
+ * frame, we ignore this. */
+ if (sd->bridge == BRIDGE_VC0321
+ && len > frame->v4l2_buf.length - (frame->data_end - frame->data))
+ len = frame->v4l2_buf.length - (frame->data_end - frame->data);
gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);
}