blob: 5c397deb9c46bb9544e5424e29ee85e51d4ee270 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--- linux-2.4.23/drivers/usb/vicam.c 2004-01-26 16:56:32.000000000 +0000
+++ linux-2.4.25/drivers/usb/vicam.c 2004-04-20 18:15:53.000000000 +0100
@@ -601,12 +601,19 @@
case VIDIOCSWIN:
{
- struct video_window *vw = (struct video_window *) arg;
- DBG("VIDIOCSWIN %d x %d\n", vw->width, vw->height);
+ struct video_window vw;
- if ( vw->width != 320 || vw->height != 240 )
+ if (copy_from_user(&vw, arg, sizeof(vw)))
+ {
retval = -EFAULT;
+ break;
+ }
+
+ DBG("VIDIOCSWIN %d x %d\n", vw->width, vw->height);
+ if ( vw.width != 320 || vw.height != 240 )
+ retval = -EFAULT;
+
break;
}
|