NUL termination
David Relson
relson at osagesoftware.com
Tue Jan 28 05:27:41 CET 2003
At 11:15 PM 1/27/03, Matt Armstrong wrote:
>NUL is actually a valid character for mail content, so in general
>using functions that are sensitive to NUL are a bad idea when
>processing mail.
>
>Though I doubt any spammer would start inserting NULs into mail to
>defeat bogofilter, since it probably defeats most every MUA around.
>E.g. I once inserted a NUL in an HTML page and the only browser I
>could find that could render it was an early version of Netscape 4.x.
Matt,
It's certainly possible that my quick fix may not be the final solution for
this problem. It does keep the string functions from rampaging through
memory beyond the buffer. Bogofilter's low level input routine allows
NULs. In fact it was implemented with that purpose in mind.
I'll have to try the experiment -- insert a NUL into some html and see if
the new code does well or poorly.
David
More information about the bogofilter-dev
mailing list