patch-2.4.19 linux-2.4.19/drivers/usb/usbvideo.c
Next file: linux-2.4.19/drivers/usb/vicam.c
Previous file: linux-2.4.19/drivers/usb/usbnet.c
Back to the patch index
Back to the overall index
- Lines: 13
- Date:
Fri Aug 2 17:39:45 2002
- Orig file:
linux-2.4.18/drivers/usb/usbvideo.c
- Orig date:
Wed Oct 10 23:42:46 2001
diff -urN linux-2.4.18/drivers/usb/usbvideo.c linux-2.4.19/drivers/usb/usbvideo.c
@@ -1737,6 +1737,12 @@
* have - even if the application wants more. That would be
* a big security embarassment!
*/
+
+ if (count + frame->seqRead_Index < count)
+ {
+ count = -EINVAL;
+ goto read_done;
+ }
if ((count + frame->seqRead_Index) > frame->seqRead_Length)
count = frame->seqRead_Length - frame->seqRead_Index;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)