Package: blop
Version: 0.2.8-5
Severity: important
Tags: patch

--- Please enter the report below this line. ---

All LADSPA plugins from this package call
  setlocale (LC_ALL, "");
which is a bad idea because it screws up the locale setting of any
application using the plugin.
This can lead to really hard to find bugs with applications that depend
on the standard "C" locale, e.g. to parse floats with scanf/strtod/...
(a locale that uses ',' instead of '.' as a float radix will break things).

This is even harder to track down when using a LADSPA plugin in your
~/.asoundrc (I hunted down strange behaviour in the "dhewm3" doom3
port[1] from doom3 -> openal-soft -> portaudio -> libasound2 -> LADSPA
plugins.. this took me several weekends).
Using *any* LADSPA plugin (even if it's from a non-broken package like
the cmt package) can trigger that bug, as the plugin is usally
identified by its id or label in the .asoundrc, which implies that any
LADSPA plugin installed on the system will be loaded to check if the
id/label matches.

I've attached a patch that removes all calls to setlocale(). If an
application wants to use the localized plugin names it should call
setlocale() itself (and I guess most localized applications do that anyway).

BTW: The swh-plugins package has the same bug, the cmt package doesn't.
I'll file bug reports for swh-plugins separately.


Cheers,
- Daniel

[1] http://imgur.com/8Ld0C + crashes when loading maps

--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.39-bpo.2-amd64

Debian Release: 6.0.4
  500 stable          security.debian.org
  500 stable          ftp.de.debian.org
  500 stable          dl.google.com
  500 stable          deb.opera.com
  100 squeeze-backports backports.debian.org

--- Package information. ---
Depends        (Version) | Installed
========================-+-=============
libc6       (>= 2.3.5-1) | 2.11.3-2


Package's Recommends field is empty.

Package's Suggests field is empty.



diff -ru blop-0.2.8.orig/src/adsr_1653.so.c blop-0.2.8/src/adsr_1653.so.c
--- blop-0.2.8.orig/src/adsr_1653.so.c	2012-05-13 00:59:21.096519570 +0200
+++ blop-0.2.8/src/adsr_1653.so.c	2012-05-13 01:04:10.061932249 +0200
@@ -298,7 +298,6 @@
 	                         unsigned long) = {runAdsr};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/adsr_1680.so.c blop-0.2.8/src/adsr_1680.so.c
--- blop-0.2.8.orig/src/adsr_1680.so.c	2012-05-13 00:59:21.100519592 +0200
+++ blop-0.2.8/src/adsr_1680.so.c	2012-05-13 01:04:10.065932270 +0200
@@ -301,7 +301,6 @@
                              unsigned long) = {runAdsr};
 
 #ifdef ENABLE_NLS
-    setlocale (LC_ALL, "");
     bindtextdomain (PACKAGE, LOCALEDIR);
     textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/amp_1654.so.c blop-0.2.8/src/amp_1654.so.c
--- blop-0.2.8.orig/src/amp_1654.so.c	2012-05-13 00:59:21.096519570 +0200
+++ blop-0.2.8/src/amp_1654.so.c	2012-05-13 01:04:10.069932300 +0200
@@ -175,7 +175,6 @@
 	                                           runAmp_gcia_oa};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/branch_1673.so.c blop-0.2.8/src/branch_1673.so.c
--- blop-0.2.8.orig/src/branch_1673.so.c	2012-05-13 00:59:21.096519570 +0200
+++ blop-0.2.8/src/branch_1673.so.c	2012-05-13 01:04:10.073932316 +0200
@@ -161,7 +161,6 @@
 	                                           runBranch_ic_ococ};
 
 #ifdef ENABLE_NLS
-	setlocale(LC_ALL, "");
 	bindtextdomain(PACKAGE, LOCALEDIR);
 	textdomain(PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/dahdsr_2021.so.c blop-0.2.8/src/dahdsr_2021.so.c
--- blop-0.2.8.orig/src/dahdsr_2021.so.c	2012-05-13 00:59:21.100519592 +0200
+++ blop-0.2.8/src/dahdsr_2021.so.c	2012-05-13 01:04:10.081932349 +0200
@@ -796,7 +796,6 @@
 	                                           runDahdsr_CGT_Control};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/difference_2030.so.c blop-0.2.8/src/difference_2030.so.c
--- blop-0.2.8.orig/src/difference_2030.so.c	2012-05-13 00:59:21.084519519 +0200
+++ blop-0.2.8/src/difference_2030.so.c	2012-05-13 01:04:10.085932368 +0200
@@ -226,7 +226,6 @@
 	                                           runDifference_icma_oa,
 	                                           runDifference_icmc_oc};
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/fmod_1656.so.c blop-0.2.8/src/fmod_1656.so.c
--- blop-0.2.8.orig/src/fmod_1656.so.c	2012-05-13 00:59:21.084519519 +0200
+++ blop-0.2.8/src/fmod_1656.so.c	2012-05-13 01:04:10.089932397 +0200
@@ -237,7 +237,6 @@
 	                                           runFmod_fcma_oa,
 	                                           runFmod_fcmc_oc};
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/interpolator_1660.so.c blop-0.2.8/src/interpolator_1660.so.c
--- blop-0.2.8.orig/src/interpolator_1660.so.c	2012-05-13 00:59:21.084519519 +0200
+++ blop-0.2.8/src/interpolator_1660.so.c	2012-05-13 01:04:10.093932409 +0200
@@ -170,7 +170,6 @@
 	                         unsigned long) = {runInterpolator};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/lp4pole_1671.so.c blop-0.2.8/src/lp4pole_1671.so.c
--- blop-0.2.8.orig/src/lp4pole_1671.so.c	2012-05-13 00:59:21.096519570 +0200
+++ blop-0.2.8/src/lp4pole_1671.so.c	2012-05-13 01:04:10.093932409 +0200
@@ -224,7 +224,6 @@
 	                                           runLp4pole_fcrcia_oa};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/product_1668.so.c blop-0.2.8/src/product_1668.so.c
--- blop-0.2.8.orig/src/product_1668.so.c	2012-05-13 00:59:21.096519570 +0200
+++ blop-0.2.8/src/product_1668.so.c	2012-05-13 01:04:10.097932425 +0200
@@ -193,7 +193,6 @@
 	                                           runProduct_iaic_oa,
 	                                           runProduct_icic_oc};
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/pulse_1645.so.c blop-0.2.8/src/pulse_1645.so.c
--- blop-0.2.8.orig/src/pulse_1645.so.c	2012-05-13 00:59:21.100519592 +0200
+++ blop-0.2.8/src/pulse_1645.so.c	2012-05-13 01:04:10.101932447 +0200
@@ -340,7 +340,6 @@
 	                                           runPulse_fcpc_oa};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/quantiser.so.c blop-0.2.8/src/quantiser.so.c
--- blop-0.2.8.orig/src/quantiser.so.c	2012-05-13 00:59:21.084519519 +0200
+++ blop-0.2.8/src/quantiser.so.c	2012-05-13 01:04:10.109932493 +0200
@@ -573,7 +573,6 @@
                                               runQuantiser_control};
  */
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/random_1661.so.c blop-0.2.8/src/random_1661.so.c
--- blop-0.2.8.orig/src/random_1661.so.c	2012-05-13 00:59:21.096519570 +0200
+++ blop-0.2.8/src/random_1661.so.c	2012-05-13 01:04:10.113932508 +0200
@@ -396,7 +396,6 @@
 	                                           runRandom_fcsc_oa};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/ratio_2034.so.c blop-0.2.8/src/ratio_2034.so.c
--- blop-0.2.8.orig/src/ratio_2034.so.c	2012-05-13 00:59:21.100519592 +0200
+++ blop-0.2.8/src/ratio_2034.so.c	2012-05-13 01:04:10.117932523 +0200
@@ -235,7 +235,6 @@
 	                                           runRatio_ncda_oa,
 	                                           runRatio_ncdc_oc};
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/sawtooth_1641.so.c blop-0.2.8/src/sawtooth_1641.so.c
--- blop-0.2.8.orig/src/sawtooth_1641.so.c	2012-05-13 00:59:21.100519592 +0200
+++ blop-0.2.8/src/sawtooth_1641.so.c	2012-05-13 01:04:10.121932544 +0200
@@ -206,7 +206,6 @@
 	                                           runSawtooth_fc_oa};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/sequencer.so.c blop-0.2.8/src/sequencer.so.c
--- blop-0.2.8.orig/src/sequencer.so.c	2012-05-13 00:59:21.084519519 +0200
+++ blop-0.2.8/src/sequencer.so.c	2012-05-13 01:04:10.125932574 +0200
@@ -246,7 +246,6 @@
 	                         unsigned long) = {runSequencer};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/square_1643.so.c blop-0.2.8/src/square_1643.so.c
--- blop-0.2.8.orig/src/square_1643.so.c	2012-05-13 00:59:21.084519519 +0200
+++ blop-0.2.8/src/square_1643.so.c	2012-05-13 01:04:10.129932590 +0200
@@ -208,7 +208,6 @@
 	                                           runSquare_fc_oa};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/sum_1665.so.c blop-0.2.8/src/sum_1665.so.c
--- blop-0.2.8.orig/src/sum_1665.so.c	2012-05-13 00:59:21.084519519 +0200
+++ blop-0.2.8/src/sum_1665.so.c	2012-05-13 01:04:10.133932606 +0200
@@ -193,7 +193,6 @@
 	                                           runSum_iaic_oa,
 	                                           runSum_icic_oc};
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/sync_pulse_2023.so.c blop-0.2.8/src/sync_pulse_2023.so.c
--- blop-0.2.8.orig/src/sync_pulse_2023.so.c	2012-05-13 00:59:21.096519570 +0200
+++ blop-0.2.8/src/sync_pulse_2023.so.c	2012-05-13 01:04:10.137932623 +0200
@@ -250,7 +250,6 @@
 	                                           runSyncPulse_fcpcga_oa};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/sync_square_1678.so.c blop-0.2.8/src/sync_square_1678.so.c
--- blop-0.2.8.orig/src/sync_square_1678.so.c	2012-05-13 00:59:21.100519592 +0200
+++ blop-0.2.8/src/sync_square_1678.so.c	2012-05-13 01:04:10.141932642 +0200
@@ -233,7 +233,6 @@
 	                                           runSyncSquare_fcga_oa};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/tracker_2025.so.c blop-0.2.8/src/tracker_2025.so.c
--- blop-0.2.8.orig/src/tracker_2025.so.c	2012-05-13 00:59:21.096519570 +0200
+++ blop-0.2.8/src/tracker_2025.so.c	2012-05-13 01:04:10.145932671 +0200
@@ -267,7 +267,6 @@
 	                                           runTracker_gaacdcia_oa};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif
diff -ru blop-0.2.8.orig/src/triangle_1649.so.c blop-0.2.8/src/triangle_1649.so.c
--- blop-0.2.8.orig/src/triangle_1649.so.c	2012-05-13 00:59:21.096519570 +0200
+++ blop-0.2.8/src/triangle_1649.so.c	2012-05-13 01:04:10.145932671 +0200
@@ -359,7 +359,6 @@
 	                                           runTriangle_fcsc_oa};
 
 #ifdef ENABLE_NLS
-	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
 #endif

Reply via email to