1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-12 14:29:28 +00:00

Dont try to play tracks outside whats on the media.

PR 26647
This commit is contained in:
Søren Schmidt 2001-05-30 08:06:57 +00:00
parent e4f333695d
commit 28e3e06ebc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77476

View File

@ -798,7 +798,8 @@ acdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
args->end_track = cdp->toc.hdr.ending_track + 1;
t1 = args->start_track - cdp->toc.hdr.starting_track;
t2 = args->end_track - cdp->toc.hdr.starting_track;
if (t1 < 0 || t2 < 0) {
if (t1 < 0 || t2 < 0 ||
t1 > (cdp->toc.hdr.ending_track-cdp->toc.hdr.starting_track)) {
error = EINVAL;
break;
}