patch-2.4.7 linux/drivers/media/video/bttv-driver.c

Next file: linux/drivers/media/video/buz.c
Previous file: linux/drivers/media/video/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.6/linux/drivers/media/video/bttv-driver.c linux/drivers/media/video/bttv-driver.c
@@ -1688,6 +1688,9 @@
 				vfree(vcp);
 				return -EFAULT;
 			}
+		} else if (vw.clipcount > 2048) {
+			up(&btv->lock);
+			return -EINVAL;
 		} else if (vw.clipcount) {
 			if((vcp=vmalloc(sizeof(struct video_clip)*
 					(vw.clipcount))) == NULL) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)