MESSAGE
DATE | 2004-04-22 |
FROM | Ruben Safir Secretary NYLXS
|
SUBJECT | Re: [hangout] [billy@mail.dadadada.net: cdparanoia: minor memory leak]
|
Last night as I was going to sleep I was thinking of doing just this and sending it to the CVS server.
Ruben On Wed, Apr 21, 2004 at 02:35:21PM -0400, Billy wrote: > > 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
-- __________________________ Brooklyn Linux Solutions
So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998
DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://fairuse.nylxs.com
http://www.mrbrklyn.com - Consulting http://www.inns.net <-- Happy Clients http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from around the net http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn....
1-718-382-0585 ____________________________ NYLXS: New Yorker Free Software Users Scene Fair Use - because it's either fair use or useless.... NYLXS is a trademark of NYLXS, Inc
|
|