Csound Csound-dev Csound-tekno Search About

[Cs-dev] csladspa segmentation fault & fix

Date2007-11-25 16:11
FromFelipe Sateler
Subject[Cs-dev] csladspa segmentation fault & fix
AttachmentsNone  None  None  

Date2007-11-25 17:45
FromRory Walsh
SubjectRe: [Cs-dev] csladspa segmentation fault & fix
Thanks Felipe. I'm sure Victor will check that into the CVS once he gets 
a chance.

Rory.


Felipe Sateler wrote:
> Installing csladspa causes a segmentation fault on ardour (and probably other 
> ladspa-enabled programs) (when loading the ladspa plugins, of course). The 
> root of the problem is this section from CountCSD (trimmed for clarity):
> 
> ladspa_path = getenv("LADSPA_PATH");
> path = ladspa_path;
> 
> The problem is that if LADSPA_PATH is unset, getenv returns NULL, std::string 
> tries to call strlen on that (of course, this depends on the std c++ lib 
> implementation), and boom, crash. Safeguarding the path assigning like this 
> fixes the issue:
> 
>   if(ladspa_path != NULL)
>           path = ladspa_path;
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net