[Pkg-opt-media-team] [SCM] cdparanoia packaging branch, master, updated. debian/3.10.2+debian-10-1-gca62a7f
Rogério Brito
rbrito at ime.usp.br
Tue Nov 9 23:55:26 UTC 2010
The following commit has been merged in the master branch:
commit ca62a7f3da6585a5a3822557f13725643b4e3f85
Author: Rogério Brito <rbrito at ime.usp.br>
Date: Tue Nov 9 21:53:43 2010 -0200
Fix a memory leak in the device scanning code. Patch adapted from Billy D. Closes: #245167.
diff --git a/debian/patches/cdparanoia_memleak_fix.patch b/debian/patches/cdparanoia_memleak_fix.patch
new file mode 100644
index 0000000..b710681
--- /dev/null
+++ b/debian/patches/cdparanoia_memleak_fix.patch
@@ -0,0 +1,17 @@
+Author: Billy Donahue <billy.donahue at gmail.com>
+Reviewed-By: Rogério Theodoro de Brito <rbrito at ime.usp.br>
+Subject: Fix memory leak in cdparanoia's scanning of devices
+Bug-Debian: http://bugs.debian.org/245167
+Last-Updated: 2010-11-09
+
+--- a/interface/scan_devices.c
++++ b/interface/scan_devices.c
+@@ -97,6 +97,8 @@
+ return(d);
+ idmessage(messagedest,messages,"",NULL);
+ #endif
++
++ free(buffer);
+ }
+ }else{
+ /* Name. Go for it. */
diff --git a/debian/patches/cdparanoia_optimize_scan.patch b/debian/patches/cdparanoia_optimize_scan.patch
new file mode 100644
index 0000000..7178d0f
--- /dev/null
+++ b/debian/patches/cdparanoia_optimize_scan.patch
@@ -0,0 +1,45 @@
+Author: Billy Donahue <billy.donahue at gmail.com>
+Reviewed-By: Rogério Theodoro de Brito <rbrito at ime.usp.br>
+Subject: Small optimization to cdparanoia's scanning of devices
+Bug-Debian: http://bugs.debian.org/245167
+Last-Updated: 2010-11-09
+
+--- a/interface/scan_devices.c
++++ b/interface/scan_devices.c
+@@ -80,25 +80,25 @@
+ /* is it a name or a pattern? */
+ char *pos;
+ if((pos=strchr(cdrom_devices[i],'?'))){
+- int j;
+- /* try first eight of each device */
+- for(j=0;j<4;j++){
++ const char suffixes[] = "0a1b2c3d";
++ int j=0;
++ /* try each suffix for each device pattern */
++ while (suffixes[j]) {
+ char *buffer=copystring(cdrom_devices[i]);
+
+ /* number, then letter */
+-
+- buffer[pos-(cdrom_devices[i])]=j+48;
++ buffer[pos-(cdrom_devices[i])]=suffixes[j];
+ if((d=cdda_identify(buffer,messagedest,messages)))
+ return(d);
+ idmessage(messagedest,messages,"",NULL);
+-#if defined(__linux__)
+- buffer[pos-(cdrom_devices[i])]=j+97;
+- if((d=cdda_identify(buffer,messagedest,messages)))
+- return(d);
+- idmessage(messagedest,messages,"",NULL);
+-#endif
+
+ free(buffer);
++
++#if defined(__linux__)
++ j++;
++#else
++ j+=2; /* If we're not running Linux, skip letters. */
++#endif
+ }
+ }else{
+ /* Name. Go for it. */
diff --git a/debian/patches/series b/debian/patches/series
index a99f7fa..8e866a3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,5 @@
06-autoconf.patch
07-jpmanfix.patch
cdparanoia-force-progress-bar.diff
+cdparanoia_memleak_fix.patch
+cdparanoia_optimize_scan.patch
--
cdparanoia packaging
More information about the Pkg-opt-media-team
mailing list