Segmentation fault in 12.2 debian package...
David Relson
relson at osagesoftware.com
Tue May 13 05:57:47 CEST 2003
Jim and David,
Try the attached patch. I think it'll fix the segfault with that message.
David
-------------- next part --------------
--- lexer.c.orig 2003-05-10 11:02:27.000000000 -0400
+++ lexer.c 2003-05-12 23:54:45.000000000 -0400
@@ -1,4 +1,4 @@
-/* $Id: lexer.c,v 1.24 2003/05/10 14:55:08 relson Exp $ */
+/* $Id: lexer.c,v 1.25 2003/05/13 00:47:19 relson Exp $ */
/*
* NAME
@@ -39,7 +39,6 @@
static int yy_get_new_line(buff_t *buff);
static int skip_spam_header(buff_t *buff);
static int get_decoded_line(buff_t *buff);
-static void check_alphanum(buff_t *buff);
/* Function Definitions */
@@ -52,27 +51,6 @@
fputc('\n', dbgout);
}
-static void check_alphanum(buff_t *buff)
-{
- size_t e = 0;
- size_t i;
- size_t l = buff->t.leng;
- byte *txt = buff->t.text;
-
- if (l < MAXTOKENLEN)
- return;
- for (i = 0; i < buff->t.leng; i += 1) {
- if (isalnum((unsigned char) txt[i]))
- e = i;
- else
- break;
- }
- if (e > MAXTOKENLEN) {
- memcpy(txt, txt+e, l-e);
- buff->t.leng -= e;
- }
-}
-
bool is_from(word_t *w)
{
return (w->leng >= 5 && memcmp(w->text, "From ", 5) == 0);
@@ -199,7 +177,6 @@
if (decoded_count != 0 && decoded_count < count) {
buff->t.leng -= count - decoded_count;
count = decoded_count;
- check_alphanum(buff);
if (DEBUG_LEXER(1))
lexer_display_buffer(buff);
}
More information about the Bogofilter
mailing list