int len;
for (;;) {
- len = vsnprintf(buffer, sizeof(buffer), fmt, ap);
+ len = vsnprintf(buffer, size, fmt, ap);
/* snprintf should return -1 only in the error case, but older glibcs
* and probably other systems are buggy in this respect and return -1 if