[PATCH 2.6.5-rc2] CAN-2004-0075 still valid for 2.6?

From: Marc-Christian Petersen
Date: Sat Mar 20 2004 - 15:02:44 EST


Hi Greg,

seems $subject is still valid for 2.6, no? - 2.4 got a fix 11 weeks ago.

See this:
http://linux.bkbits.net:8080/linux-2.4/diffs/drivers/usb/vicam.c@xxxx?nav=index.html|
src/|src/drivers|src/drivers/usb|hist/drivers/usb/vicam.c

Please apply.

ciao, Marc
# drivers/usb/media/vicam.c | 13 ++++++++++---
# 1 files changed, 10 insertions(+), 3 deletions(-)

diff -urN linux-old/drivers/usb/media/vicam.c linux-wolk-for-2.6drivers/usb/media/vicam.c
--- linux-old/drivers/usb/media/vicam.c 2003-11-28 10:26:20.000000000 -0800
+++ linux-wolk-for-2.6drivers/usb/media/vicam.c 2004-01-15 12:10:23.000000000 -0800
@@ -653,12 +653,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;
}