patch for bogofilter status line
matthias.andree at gmx.de
Mon Dec 2 15:14:08 EST 2002
Graham Wilson <bob at decoy.wox.org> writes:
> attached is a patch (against cvs) that allows you to customise the
> X-Bogosity header output, the terse mode output, and the messages sent
> to syslog(3) when updating or checking. at this point, it should produce
> the same output that the current code does.
For any future code submissions, may I suggest that we use
strlcpy/strlcat instead? The man page is in CVS.
Note they take the buffer size, so what you may get is at most one less
of the size you pass in, but that makes it safe: strncpy/strncat omit
the trailing NUL if there's no room for it, which let these degerate
into memcpy, and causing buffer overruns on read later.
Yes, the C standard library stinks, and strlcpy is not much better, but
safer to use.
More information about the Bogofilter-dev