[cvs] bogofilter/src mime.c,1.36,1.37
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <re...@us...> - 2005-01-06 03:15:22
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16294 Modified Files: mime.c Log Message: Fix mime boundary check flaw and accompanying regression test results. Index: mime.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/mime.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- mime.c 6 Jan 2005 02:48:33 -0000 1.36 +++ mime.c 6 Jan 2005 03:15:13 -0000 1.37 @@ -318,11 +318,9 @@ /* search stack for matching boundary, in reverse order */ for (i = stackp; i > -1; i--) { if (is_mime_container(&msg_stack[i]) - && msg_stack[i].boundary -#ifdef THIS_BUGFIX_TWISTS_TEST_SUITE - && blen == msg_stack[i].boundary_len -#endif - && memcmp(msg_stack[i].boundary, buf, blen) == 0) + && msg_stack[i].boundary != NULL + && msg_stack[i].boundary_len == blen + && (memcmp(msg_stack[i].boundary, buf, blen) == 0)) { b->depth = i; b->is_valid = true; |