[cvs] bogofilter/src lexer_v3.l,1.71,1.72 token.c,1.51,1.52
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <re...@us...> - 2003-09-02 19:45:31
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1:/tmp/cvs-serv25124 Modified Files: lexer_v3.l token.c Log Message: Revise rule for empty line to eliminate look aheade and avoid flex buffer overflow trouble. Index: lexer_v3.l =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/lexer_v3.l,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- lexer_v3.l 1 Sep 2003 19:16:19 -0000 1.71 +++ lexer_v3.l 2 Sep 2003 19:45:28 -0000 1.72 @@ -223,7 +223,7 @@ <INITIAL>boundary=[ ]*\"?{MIME_BOUNDARY}\"? { mime_boundary_set(yy_text()); } <INITIAL>name=\"? ; <INITIAL>filename=\"? ; -<INITIAL>^[ \b\t]*\n { lineno += 1; +<INITIAL>^[ \b\t]*$ { lineno += 1; if (get_content_type() == MIME_TEXT_HTML) BEGIN HTML; else Index: token.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/token.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- token.c 31 Aug 2003 21:05:24 -0000 1.51 +++ token.c 2 Sep 2003 19:45:28 -0000 1.52 @@ -91,7 +91,7 @@ case EMPTY: /* empty line -- check for bogus end of header */ if (msg_state->mime_type == MIME_MESSAGE) mime_add_child(msg_state); - if (yylval->leng == 1) + if (yylval->leng == 0) continue; else /* "spc:invalid_end_of_header" */ yylval = word_dup(nonblank_line); |