[Bf-committers] Long plugin path problem

Robert Wenzlaff bf-committers@blender.org
Sun, 21 Sep 2003 18:16:08 -0400


On Sunday 21 September 2003 05:48 pm, Stephane SOPPERA wrote:
> > Hi!
> >
> > I noticed today that the path of sequence plugins is limited to 80
> > caracters (name member of the PluginSeq struct) and that strcpy is
> > used to copy the path in this variable. So the memory is corrupted
> > when the path for a plugin is longer than 80 characters (that's the
> > case of many plugins on my system) and the plugin don't work ;-)
> >
> > An easy fix would be to set a bigger limit (bigger than FILE_MAXDIR
> > which is quite small and lesser than PATH_MAX on my system). A better
> > fix should be to use a C++ class for strings ;-)

Well since most of the code is in straight C, the second option is a bit 
tedious...

_POSIX_PATH_MAX is 256, so there's no reason to make it longer than that.  And 
it even pads the DNA nicely.   And in the big picture, really isn't that much 
wasted memory.

-- 
********************************************
       I prefer Rush to G. Gordon Liddy.
        After all, the Watergate Tapes
        can't hold a candle to either 
         "2112" or "Moving Pictures".
********************************************
Robert Wenzlaff  rwenzlaff@soylent-green.com