Skip site navigation (1)Skip section navigation (2)
Date:      Tue,  8 May 2001 22:37:03 +0200 (CEST)
From:      thomas@cuivre.fr.eu.org
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/27213: Suspicious variable hiding in acdioctl
Message-ID:  <20010508203703.C72C624D03@melusine.cuivre.fr.eu.org>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010508203703.C72C624D03>