patch-2.4.0-test10 linux/drivers/scsi/sg.c

Next file: linux/drivers/scsi/sim710.c
Previous file: linux/drivers/scsi/scsi_merge.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test9/linux/drivers/scsi/sg.c linux/drivers/scsi/sg.c
@@ -2578,7 +2578,7 @@
 	return -EACCES;
     num = (count < 10) ? count : 10;
     copy_from_user(buff, buffer, num);
-    buff[count] = '\0';
+    buff[num] = '\0';
     k = simple_strtoul(buff, 0, 10);
     if (k <= 1048576) {
 	sg_big_buff = k;

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