Date: Mon, 26 May 2003 12:04:07 +0900 (JST) From: Alexander Nedotsukov <bland@mail.ru> To: FreeBSD-gnats-submit@FreeBSD.org Cc: mdodd@FreeBSD.org Subject: bin/52685: variable used uninitialized in usbhidctl Message-ID: <200305260304.h4Q347QZ088520@bbnest.dyndns.org> Resent-Message-ID: <200305260310.h4Q3A9tM032144@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 52685 >Category: bin >Synopsis: variable used uninitialized in usbhidctl >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun May 25 20:10:09 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Alexander Nedotsukov >Release: FreeBSD 5.1-BETA i386 >Organization: >Environment: System: FreeBSD bbnest.dyndns.org 5.1-BETA FreeBSD 5.1-BETA #5: Sat May 10 21:37:53 JST 2003 bland@bbnest.dyndns.org:/usr/obj/usr/src/sys/SU i386 >Description: Local variable report_id is never initialized before use. See dumpdata() function. >How-To-Repeat: >Fix: Apply the patch attached. --- usbhid.c.diff begins here --- --- usr.bin/usbhidctl/usbhid.c.orig Mon May 26 11:42:36 2003 +++ usr.bin/usbhidctl/usbhid.c Mon May 26 11:45:07 2003 @@ -201,7 +201,6 @@ static int one = 1; u_int32_t colls[100]; int sp = 0; - int report_id; char namebuf[10000], *namep; hids = 0; @@ -245,7 +244,7 @@ if (all || gotname(namebuf)) { if (!noname) printf("%s=", namebuf); - prdata(dbuf + (report_id != 0), n); + prdata(dbuf + (reportid != 0), n); printf("\n"); } } --- usbhid.c.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305260304.h4Q347QZ088520>