NUL termination

Matthias Andree matthias.andree at gmx.de
Wed Jan 29 01:42:13 CET 2003


David Relson <relson at osagesoftware.com> writes:

> 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.

We should kill any str* functions for processing mail content.

> I'll have to try the experiment -- insert a NUL into some html and see
> if the new code does well or poorly.

Hum. The NUL character is not special, and trying it out won't prove the
code is correct. We can't do in-band signaling of "end of string"
conditions, because all our 256 symbols of unsigned char are available
for payload.

-- 
Matthias Andree




More information about the bogofilter-dev mailing list