PATCH - lexer.c

David Relson relson at osagesoftware.com
Wed Jun 29 01:19:18 CEST 2005


Second attempt!  The first attempt's attachment got trimmed by
mailman :-<

-------------- next part --------------
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;


More information about the bogofilter mailing list