patch-2.4.9 linux/drivers/cdrom/cdrom.c
Next file: linux/drivers/char/ChangeLog
Previous file: linux/drivers/bluetooth/hci_usb.c
Back to the patch index
Back to the overall index
- Lines: 15
- Date:
Thu Aug 16 09:30:45 2001
- Orig file:
v2.4.8/linux/drivers/cdrom/cdrom.c
- Orig date:
Wed Jul 25 17:10:19 2001
diff -u --recursive --new-file v2.4.8/linux/drivers/cdrom/cdrom.c linux/drivers/cdrom/cdrom.c
@@ -2246,8 +2246,13 @@
if ((ret = cdo->generic_packet(cdi, &cgc)))
return ret;
- cgc.cmd[8] = cgc.buflen = be16_to_cpu(ti->track_information_length) +
+ cgc.buflen = be16_to_cpu(ti->track_information_length) +
sizeof(ti->track_information_length);
+
+ if (cgc.buflen > sizeof(track_information))
+ cgc.buflen = sizeof(track_information);
+
+ cgc.cmd[8] = cgc.buflen;
return cdo->generic_packet(cdi, &cgc);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)