Eric Blake wrote: > since vasnprintf has the > nice API property that, unlike all other *printf functions, it does not > return an int, it should not need to be limited by INT_MAX; otherwise you > are introducing an artificial limitation
You're right; I forgot about this argumentation. My patch contradicted a comment at the end of the function. Undone: 2007-03-18 Bruno Haible <[EMAIL PROTECTED]> * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch. Suggested by Eric Blake. *** lib/vasnprintf.c 18 Mar 2007 00:31:50 -0000 1.30 --- lib/vasnprintf.c 19 Mar 2007 00:57:09 -0000 *************** *** 184,193 **** { result = resultbuf; allocated = *lengthp; - /* POSIX says that snprintf() fails with EOVERFLOW when the specified - buffer size is larger than INT_MAX. Let's do the same here. */ - if (allocated > INT_MAX) - goto overflow; } else { --- 184,189 ----