svn commit: samba r13397 - in
branches/SAMBA_4_0/source/lib/talloc: .
James Peach
jpeach at samba.org
Thu Feb 9 00:50:12 GMT 2006
On Thu, 2006-02-09 at 11:38 +1100, tridge at samba.org wrote:
> 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.
Agreed. Fixed in r13400.
--
James Peach | jpeach at samba.org
More information about the samba-technical
mailing list