patch-2.4.7 linux/drivers/cdrom/sbpcd.c
Next file: linux/drivers/char/Config.in
Previous file: linux/drivers/cdrom/mcd.c
Back to the patch index
Back to the overall index
- Lines: 9
- Date:
Mon Jul 16 15:13:32 2001
- Orig file:
v2.4.6/linux/drivers/cdrom/sbpcd.c
- Orig date:
Thu May 24 15:14:08 2001
diff -u --recursive --new-file v2.4.6/linux/drivers/cdrom/sbpcd.c linux/drivers/cdrom/sbpcd.c
@@ -4308,7 +4308,7 @@
i=verify_area(VERIFY_READ, (void *) arg, sizeof(struct cdrom_read_audio));
if (i) RETURN_UP(i);
copy_from_user(&read_audio, (void *) arg, sizeof(struct cdrom_read_audio));
- if (read_audio.nframes>D_S[d].sbp_audsiz) RETURN_UP(-EINVAL);
+ if (read_audio.nframes < 0 || read_audio.nframes>D_S[d].sbp_audsiz) RETURN_UP(-EINVAL);
i=verify_area(VERIFY_WRITE, read_audio.buf,
read_audio.nframes*CD_FRAMESIZE_RAW);
if (i) RETURN_UP(i);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)