Date: Tue, 17 Apr 2001 16:50:46 +0200 (CEST) From: un1i@rz.uni-karlsruhe.de To: FreeBSD-gnats-submit@freebsd.org Subject: kern/26647: [PATCH] ATA/ATAPI driver should check for too high track numbers for CDIOCPLAYTRACKS Message-ID: <200104171450.f3HEokp00881@i609.hadiko.de>
next in thread | raw e-mail | index | archive | help
>Number: 26647
>Category: kern
>Synopsis: [PATCH] ATA/ATAPI driver should check for too high track numbers for CDIOCPLAYTRACKS
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Apr 17 08:00:12 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Philipp Mergenthaler
>Release: FreeBSD 5.0-CURRENT i386
>Organization:
University of Karlsruhe
>Environment:
System: FreeBSD i609.hadiko.de 5.0-CURRENT FreeBSD 5.0-CURRENT #372: Tue Apr 17 16:15:35 CEST 2001 p@i609.hadiko.de:/usr/obj/usr/src/sys/I609 i386
>Description:
Cosmetic - acdioctl() doesn't check whether the starting track for
CDIOCPLAYTRACKS is too high. This can result in a console message with
the drive's error message.
>How-To-Repeat:
(for an audio cd with 20 tracks:)
~%cdcontrol play 21
acd0: PLAY_MSF - ILLEGAL REQUEST asc=0x21 ascq=0x00 error=0x00
>Fix:
Index: atapi-cd.c
===================================================================
RCS file: /ncvs/src/sys/dev/ata/atapi-cd.c,v
retrieving revision 1.88
diff -u -r1.88 atapi-cd.c
--- atapi-cd.c 2001/04/05 11:17:33 1.88
+++ atapi-cd.c 2001/04/17 14:00:05
@@ -801,7 +801,8 @@
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;
}
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104171450.f3HEokp00881>
