From owner-freebsd-bugs@FreeBSD.ORG Wed Aug 13 07:50:09 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0231D37B401 for ; Wed, 13 Aug 2003 07:50:09 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7949543FCB for ; Wed, 13 Aug 2003 07:50:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h7DEo7Up019579 for ; Wed, 13 Aug 2003 07:50:07 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h7DEo7lp019578; Wed, 13 Aug 2003 07:50:07 -0700 (PDT) Resent-Date: Wed, 13 Aug 2003 07:50:07 -0700 (PDT) Resent-Message-Id: <200308131450.h7DEo7lp019578@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Anthony Wood Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E093937B401 for ; Wed, 13 Aug 2003 07:45:31 -0700 (PDT) Received: from user242.net686.va.sprint-hsd.net (user242.net686.va.sprint-hsd.net [65.41.107.242]) by mx1.FreeBSD.org (Postfix) with SMTP id 2340D43F93 for ; Wed, 13 Aug 2003 07:45:31 -0700 (PDT) (envelope-from adwood@earthlink.net) Received: (qmail 44585 invoked by uid 1001); 13 Aug 2003 06:03:44 -0000 Message-Id: <20030813060344.44584.qmail@lichen.forest.org> Date: 13 Aug 2003 06:03:44 -0000 From: Anthony Wood To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/55546: cdcontrol play tr m:s.f interface is partially broken X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Anthony Wood List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2003 14:50:09 -0000 >Number: 55546 >Category: bin >Synopsis: cdcontrol play tr m:s.f interface is partially broken >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: Wed Aug 13 07:50:07 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Anthony Wood >Release: FreeBSD 4.8-STABLE i386 >Organization: >Environment: System: FreeBSD lichen.forest.org 4.8-STABLE FreeBSD 4.8-STABLE #0: Fri Jul 18 18:31:24 EDT 2003 root@user56.net688.va.sprint-hsd.net:/usr/obj/usr/src/sys/LICHEN i386 Standard 4-STABLE system. >Description: The 'play tr m:s.f ...' interface is broken, such that cdcontrol sometimes rejects a minute:second offset improperly, saying that 'Track x is not that long.' Other times, when it should reject the request (eg, 'play 12 35:0'), an Input/Output error occurs instead. >How-To-Repeat: [Note: 5.x has a fix for a separate (track - 1) problem that is necessary to reproduce in exactly the way shown here.] cdcontrol> info Starting track = 1, ending track = 19, TOC size = 162 bytes track start duration block length type ------------------------------------------------- 1 0:02.00 3:17.18 0 14793 audio 2 3:19.18 3:54.25 14793 17575 audio 3 7:13.43 2:43.55 32368 12280 audio 4 9:57.23 3:40.45 44648 16545 audio 5 13:37.68 2:03.74 61193 9299 audio 6 15:41.67 3:06.58 70492 14008 audio 7 18:48.50 2:25.66 84500 10941 audio 8 21:14.41 3:09.23 95441 14198 audio 9 24:23.64 6:36.19 109639 29719 audio 10 31:00.08 4:56.49 139358 22249 audio 11 35:56.57 4:48.60 161607 21660 audio 12 40:45.42 2:43.60 183267 12285 audio [...] cdcontrol> play 1 0:30 Track 1 is not that long. cdcontrol> play 11 30:00 cdcontrol: Input/output error >Fix: The bug is in function play(), at label Play_Relative_Addresses, where the msf.(minute|second|frame) fields taken out of toc_buffer[] are treated as if they were the duration of each track, when in fact they are the cumulative *start* of each track. To convert to duration, which is needed to range check the 'play track m:s.f' command, something like happens in prtrack() needs to happen. That is, pull the msf for this and the next track, convert both to lba, subtract, and convert back to msf. This is probably an easy bug to fix, except for the 13 different invocation varieties allowed. >Release-Note: >Audit-Trail: >Unformatted: