PATCH - lexer.c

David Relson relson at osagesoftware.com
Wed Jun 29 02:05:44 CEST 2005


On Tue, 28 Jun 2005 19:56:02 -0400
Greg Louis wrote:

> On 20050628 (Tue) at 1919:18 -0400, David Relson wrote:
> > Second attempt!  The first attempt's attachment got trimmed by
> > mailman :-<
> > 
> 
> > Index: lexer.c
> > ===================================================================
> > RCS file: /cvsroot/bogofilter/bogofilter/src/lexer.c,v
> > retrieving revision 1.135
> > diff -u -r1.135 lexer.c
> > --- lexer.c	26 Jun 2005 22:44:32 -0000	1.135
> > +++ lexer.c	28 Jun 2005 20:41:21 -0000
> > @@ -363,7 +363,7 @@
> >      else {
> >  	if (charset_leng < len) {
> >  	    charset_leng = len;
> > -	    charset_text = xrealloc(charset_text, charset_leng);
> > +	    charset_text = xrealloc(charset_text, charset_leng+D);
> >  	}
> >      }
> >  
> > @@ -393,13 +393,13 @@
> >  #ifndef	DISABLE_UNICODE
> >      if (encoding == E_UNICODE) {
> >  	if (buf == NULL)
> > -	    buf = buff_new(xmalloc(max), 0, max);
> > +	    buf = buff_new(xmalloc(max+D), 0, max+D);
> >  	r = &buf->t;				/* Use buf to return unicode result */
> >  
> >  	buf->t.leng = 0;
> >  	if (buf->size < max) {
> >  	    buf->size = max;
> > -	    buf->t.text = xrealloc(buf->t.text, buf->size);
> > +	    buf->t.text = xrealloc(buf->t.text, buf->size+D);
> >  	}
> >  
> >  	buf->t.leng = size;
> 
> 
> Fixes my problem.  Thanks!

Hi Greg,

Glad to hear it.  I can cross the lexer off my "newly broken" list.  

Work on your bogotune problem is in progress :->  I'll probably send
you a tarball with the changed files so you can test it before I
release it.

Regards,

David



More information about the Bogofilter mailing list