shithub: sox

Download patch

ref: ed128fe73e954580a50753558b0836c8a6668725
parent: 733efdeadf67e0ac0612d7d4019231274a70d4e6
author: cbagwell <cbagwell>
date: Tue Feb 15 21:18:10 EST 2011

fix segfault with some ladspa plugins.

--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,7 @@
 
   o F.R. [3051700] spectrogram -r for `raw' spectrogram, no legend.  (robs)
   o Fix -w option on stats effect. (Ronald Sprouse)
+  o Fix segfault with some ladspa plugins (Thor Andreassen)
 
 Other new features:
 
--- a/src/ladspa.c
+++ b/src/ladspa.c
@@ -103,8 +103,9 @@
   path = getenv("LADSPA_PATH");
   if (path == NULL)
     path = LADSPA_PATH;
-  lt_dlsetsearchpath(path);
-  if ((l_st->lth = lt_dlopenext(l_st->name)) == NULL) {
+
+  if(lt_dlinit() || lt_dlsetsearchpath(path)
+      || (l_st->lth = lt_dlopenext(l_st->name)) == NULL) {
     lsx_fail("could not open LADSPA plugin %s", l_st->name);
     return SOX_EOF;
   }