PATCH - lexer.c
Greg Louis
glouis at dynamicro.on.ca
Wed Jun 29 01:56:02 CEST 2005
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!
--
| G r e g L o u i s | gpg public key: 0x400B1AA86D9E3E64 |
| http://www.bgl.nu/~glouis | (on my website or any keyserver) |
| http://wecanstopspam.org in signatures helps fight junk email. |
More information about the Bogofilter
mailing list