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

Re: Length of regex/pattern for "color"



Gary R. Van Sickle <g.r.vansickle@xxxxxxxxxxxxxxxx>:

> > 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.

parv <parv@xxxxxxxx>:

> > @@ -511,7 +511,7 @@
> >    else
> >    {
> >      int r;
> > -    char buf[STRING];
> > +    char buf[LONG_STRING];
> >  
> >      tmp = mutt_new_color_line ();
> >      if (is_index) 
> 
> 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.

Edmund