From owner-freebsd-bugs Tue May 8 13:40:11 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2E0D637B424 for ; Tue, 8 May 2001 13:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f48Ke1f07480; Tue, 8 May 2001 13:40:01 -0700 (PDT) (envelope-from gnats) Received: from melusine.cuivre.fr.eu.org (ppp58-net1-idf3-bas1.isdnet.net [195.154.52.58]) by hub.freebsd.org (Postfix) with ESMTP id 3428F37B422 for ; Tue, 8 May 2001 13:37:06 -0700 (PDT) (envelope-from thomas@cuivre.fr.eu.org) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id C72C624D03; Tue, 8 May 2001 22:37:03 +0200 (CEST) Message-Id: <20010508203703.C72C624D03@melusine.cuivre.fr.eu.org> Date: Tue, 8 May 2001 22:37:03 +0200 (CEST) From: thomas@cuivre.fr.eu.org Reply-To: thomas@cuivre.fr.eu.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: kern/27213: Suspicious variable hiding in acdioctl Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 27213 >Category: kern >Synopsis: Suspicious variable hiding in acdioctl >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 08 13:40:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Thomas Quinot >Release: FreeBSD 4.3-STABLE i386 >Organization: >Environment: System: FreeBSD melusine.cuivre.fr.eu.org 4.3-STABLE FreeBSD 4.3-STABLE #2: Tue May 1 20:28:53 CEST 2001 thomas@melusine.cuivre.fr.eu.org:/usr/obj/usr/src/sys/MELUSINE i386 >Description: In the CDIOCREADAUDIO case of acdioctl, a new variable "error" is declared which hides the declaration at the top of acdioctl. Consequently, 0 is always returned instead of the value set within the case. >How-To-Repeat: >Fix: --- sys/dev/ata/atapi-cd.c.dist Tue May 8 22:32:45 2001 +++ sys/dev/ata/atapi-cd.c Tue May 8 22:33:09 2001 @@ -836,7 +836,7 @@ int32_t lba; caddr_t buffer, ubuf = args->buffer; int8_t ccb[16]; - int frames, error = 0; + int frames; if (!cdp->toc.hdr.ending_track) { error = EIO; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message