svn commit: samba r13397 - in
branches/SAMBA_4_0/source/lib/talloc: .
tridge at samba.org
tridge at samba.org
Thu Feb 9 00:38:14 GMT 2006
James,
> - len = vsnprintf(NULL, 0, fmt, ap2);
> + if ((len = vsnprintf(NULL, 0, fmt, ap2)) <= 0) {
> + return NULL;
> + }
The <= 0 test here and in the next part of the patch breaks formats
which return the empty string. For example:
char *s = talloc_asprintf(ctx, "%s", "");
which is a perfectly valid call.
I don't mind having a <0 test in the code, but a <=0 test is
definately broken.
Cheers, Tridge
More information about the samba-technical
mailing list