<<< Date Index >>>     <<< Thread Index >>>

Re: Length of regex/pattern for "color"



In the last episode (Oct 22), Edmund GRIMLEY EVANS said:
> Gary R. Van Sickle <g.r.vansickle@xxxxxxxxxxxxxxxx>:
> > Parv:
> > > Perhaps someone should go through mutt and get rid of all fixed-length
> > > buffers ...
> > 
> > Ouch, yeah, mutt doesn't want to be the next target of buffer
> > overflow attacks.
> 
> Typically mutt's buffers don't overflow, but strings get truncated,
> which is occasionally annoying.
>
> > Thanks for the patch.  I tried it, but i still get "parentheses not
> > balanced" for a setting like the one below...
> 
> LONG_STRING isn't enough for that example; you need HUGE_STRING.

I wonder if maybe LONG_STRING/HUGE_STRING could be converted to take an
argument, so C99 compilers can do variable-length stack arrays for the
exact size needed, and older compilers just get the default size.

-- 
        Dan Nelson
        dnelson@xxxxxxxxxxxxxxx