Paul Eggert wrote:
> totalsize is of type size_t, so SIZE_MAX is the problem case here, not
> INT_MAX.
Good point. Also a possible overflow in the xsum() calls before is needed.
I'm committing this changed code.
Bruno
static inline char *
xstrcat (size_t argcount, va_list args)
{
char *resu
Eric Blake wrote:
> > + p = result;
> > + va_copy (ap, args);
>
> Why are you using va_copy a second time? vsprintf is allowed to consume
> its va_list argument (aka use va_arg on it), so long as it leaves the
> va_close for the caller.
Right. This is an optim I had neglected. Thanks.
> > +
Eric Blake <[EMAIL PROTECTED]> writes:
>> + result = (char *) xmalloc (totalsize + 1);
>
> What if totalsize is INT_MAX?
totalsize is of type size_t, so SIZE_MAX is the problem case here, not
INT_MAX. So I assume you're suggesting that the earlier
"if (totalsize > INT_MAX) ..." be changed to
"