patch for bogofilter status line
Matthias Andree
matthias.andree at gmx.de
Mon Dec 2 21:14:08 CET 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.
--
Matthias Andree
More information about the bogofilter-dev
mailing list