Re: ctdb debug vasprintf memory overwrite in ib > >    ret = vsnprintf(NULL, 0, format, tmp_ap);
>
> Note that you can't rely on this returning the number of characters
> that would have been output if the buffer were large enough until C99
> or UNIX98 IIRC.

I've just found another solution: I've just changed my bzr to use 
talloc_vasprintf:

void do_debug(const char *format, ...)
...
        va_start(ap, format);
        s = talloc_vasprintf(NULL, format, ap);
        va_end(ap);
...
        talloc_free(s);

And now it seems to work fine, and I don't have to worry about va_copy 
compatibility any more... (talloc does it...)

[+ hopefully my bzr commits should be visible on samba-cvs soon...]

Peter

