patch-2.3.11 linux/drivers/cdrom/cdrom.c

Next file: linux/drivers/char/adbmouse.c
Previous file: linux/drivers/block/loop.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.10/linux/drivers/cdrom/cdrom.c linux/drivers/cdrom/cdrom.c
@@ -1145,7 +1145,9 @@
 		   ((cdi->ops->capability & ~cdi->mask & CDC_PLAY_AUDIO)!=0));
 
         strcpy(cdrom_drive_info+pos,"\n\n");
-	*lenp=pos+3;
+        pos += 3;
+        if (*lenp > pos)
+        	*lenp = pos;
 
         return proc_dostring(ctl, write, filp, buffer, lenp);
 }

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