patch-2.4.23 linux-2.4.23/drivers/usb/aiptek.c

Next file: linux-2.4.23/drivers/usb/audio.c
Previous file: linux-2.4.23/drivers/usb/acm.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/drivers/usb/aiptek.c linux-2.4.23/drivers/usb/aiptek.c
@@ -1102,7 +1102,8 @@
 	int num;
 
 	num = (count < 64) ? count : 64;
-	copy_from_user(buf, buffer, num);
+	if (copy_from_user(buf, buffer, num))
+		return -EFAULT;
 	buf[num] = '\0';
 
 	scan = buf;

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