[patch] 0.15.2 segfault with encoded header text
David Relson
relson at osagesoftware.com
Mon Sep 8 01:12:41 CEST 2003
Stefan,
Here's a patch to fix the segfault you encountered. Keep testing and
see what else you can find !!!
David
Index: lexer.c
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/src/lexer.c,v
retrieving revision 1.66
diff -u -r1.66 lexer.c
--- lexer.c 6 Sep 2003 15:30:08 -0000 1.66
+++ lexer.c 7 Sep 2003 23:06:13 -0000
@@ -324,8 +324,12 @@
memmove(beg+size, n.text, len+1);
size += len;
txt = end + 2;
- while (isspace((unsigned char)*txt))
+ while (txt < fin && *txt != '=') {
+ unsigned char ch = (unsigned char)*txt;
+ if (!isspace(ch))
+ beg[size++] = ch;
txt += 1;
+ }
}
return size;
--
David Relson Osage Software Systems, Inc.
relson at osagesoftware.com Ann Arbor, MI 48103
www.osagesoftware.com tel: 734.821.8800
More information about the bogofilter-dev
mailing list