null terminations [was: [cvs] bogofilter/src format.c ...]
David Relson
relson at osagesoftware.com
Sun Mar 13 16:09:18 CET 2005
On Sun, 13 Mar 2005 15:51:08 +0100
Matthias Andree wrote:
> David Relson <relson at users.sourceforge.net> writes:
>
> > - buff += format_string(buff, msg_addr ? (const char *)msg_addr->text : "UNKNOWN", 0, prec, flags, end);
> > + buff += format_string(buff, msg_addr.leng != 0 ? (const
> > char *)msg_addr.text : "UNKNOWN", 0, prec, flags, end);
>
> Is the zero-termination of msg_addr, msg_id, queue_id guaranteed in all
> circumstances or just a by-product from the Z() debug macro?
>
> I'm asking since the conversion from baseaddress/length strings to C
> strings isn't always providing the extra byte if these debug macros are
> switched off.
I've been counting on the Z macro. While I'm changing token.c I'll
make sure msg_addr, msg_id, and queue_id are zero terminated (without
using D and Z macros).
_______________________________________________
Bogofilter-dev mailing list
Bogofilter-dev at bogofilter.org
http://www.bogofilter.org/mailman/listinfo/bogofilter-dev
More information about the bogofilter-dev
mailing list