patch-2.4.27 linux-2.4.27/drivers/usb/brlvger.c

Next file: linux-2.4.27/drivers/usb/devio.c
Previous file: linux-2.4.27/drivers/usb/auermain.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/drivers/usb/brlvger.c linux-2.4.27/drivers/usb/brlvger.c
@@ -596,6 +596,9 @@
 
 	off = *pos;
 
+	if (off < 0)
+		return -EINVAL;
+
 	if(off > priv->plength)
 		return -ESPIPE;;
 
@@ -743,6 +746,7 @@
 	case BRLVGER_GET_INFO: {
 		struct brlvger_info vi;
 
+		memset(&vi, 0, sizeof(vi));
 		strncpy(vi.driver_version, DRIVER_VERSION,
 			sizeof(vi.driver_version));
 		vi.driver_version[sizeof(vi.driver_version)-1] = 0;

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