MESSAGE
| DATE | 2004-04-21 |
| FROM | Billy
|
| SUBJECT | Subject: [hangout] [billy@mail.dadadada.net: cdparanoia: minor memory leak]
|
From owner-hangout-desteny-at-mrbrklyn.com Wed Apr 21 14:27:46 2004 Received: from www2.mrbrklyn.com (LOCALHOST [127.0.0.1]) by mrbrklyn.com (8.12.11/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id i3LIRkbn023839 for ; Wed, 21 Apr 2004 14:27:46 -0400 Received: (from mdom-at-localhost) by www2.mrbrklyn.com (8.12.11/8.12.3/Submit) id i3LIRk5N023838 for hangout-desteny; Wed, 21 Apr 2004 14:27:46 -0400 X-Authentication-Warning: www2.mrbrklyn.com: mdom set sender to owner-hangout-at-www2.mrbrklyn.com using -f Received: from mail.dadadada.net (MAIL.DADADADA.NET [209.48.2.106]) by mrbrklyn.com (8.12.11/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id i3LIRjSG023833 for ; Wed, 21 Apr 2004 14:27:45 -0400 Received: from billy by mail.dadadada.net with local (Exim 3.35 #1 (Debian)) id 1BGMZ8-0001xY-00 for ; Wed, 21 Apr 2004 14:35:22 -0400 Date: Wed, 21 Apr 2004 14:35:21 -0400 From: Billy To: hangout-at-nylxs.com Subject: [hangout] [billy-at-mail.dadadada.net: cdparanoia: minor memory leak] Message-ID: <20040421183521.GB5169-at-mail.dadadada.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i Sender: owner-hangout-at-mrbrklyn.com Precedence: bulk Reply-To: Billy List: New Yorker GNU Linux Scene Admin: To unsubscribe send unsubscribe name-at-domian.com in the body to hangout-request-at-www2.mrbrklyn.com X-Keywords: X-UID: 32586 Status: RO X-Status: A Content-Length: 2478 Lines: 76
This 'minor' severity bug may not end up on the Debian package website.
----- Forwarded message from Billy -----
From: Billy To: Debian Bug Tracking System Subject: cdparanoia: minor memory leak Envelope-to: billy-at-mail.dadadada.net Delivery-date: Wed, 21 Apr 2004 14:26:41 -0400 X-Spam-Status: No, hits=-3.2 required=5.0 tests=UNIFIED_PATCH,NO_MX_FOR_FROM version=2.20 X-Spam-Level:
Package: cdparanoia Version: 3a9.8-6 Severity: minor Tags: patch
There's a leak in cdda_find_a_cdrom(). A buffer is allocated via copystring() for each attempt at filling the '?' wildcard in the cdrom_devices list. This buffer is never freed. Also, the buffer is allocated once per pattern attempt, which isn't really necessary, so I changed that while I was in there. I also changed the magic numbers 48 and 97 to '0' and 'a' for clarity's sake.
diff -ru cdparanoia-3a9.8/interface/scan_devices.c cdparanoia/interface/scan_devices.c --- cdparanoia-3a9.8/interface/scan_devices.c Wed Apr 21 11:41:25 2004 +++ cdparanoia/interface/scan_devices.c Wed Apr 21 11:51:49 2004 -at--at- -65,21 +65,16 -at--at- char *pos; if((pos=strchr(cdrom_devices[i],'?'))){ int j; - /* try first eight of each device */ - for(j=0;j<4;j++){ - char *buffer=copystring(cdrom_devices[i]); - + /* try 0->4 and a->d for each device */ + char *buffer=copystring(cdrom_devices[i]); + for(j=0;j<8;j++){ /* number, then letter */ - - buffer[pos-(cdrom_devices[i])]=j+48; - if((d=cdda_identify(buffer,messagedest,messages))) - return(d); - idmessage(messagedest,messages,"",NULL); - buffer[pos-(cdrom_devices[i])]=j+97; + buffer[pos-(cdrom_devices[i])]=(j>>1)+(j&1)?'a':'0'; if((d=cdda_identify(buffer,messagedest,messages))) return(d); idmessage(messagedest,messages,"",NULL); } + free(buffer); }else{ /* Name. Go for it. */ if((d=cdda_identify(cdrom_devices[i],messagedest,messages)))
-- System Information Debian Release: 3.0 Architecture: i386 Kernel: Linux mail 2.2.20 #1 Sat Apr 20 11:45:28 EST 2002 i586 Locale: LANG=C, LC_CTYPE=C
Versions of packages cdparanoia depends on: ii libcdparanoia0 3a9.8-6 Shared libraries for cdparanoia (r
----- End forwarded message ----- ____________________________ NYLXS: New Yorker Free Software Users Scene Fair Use - because it's either fair use or useless.... NYLXS is a trademark of NYLXS, Inc
|
|