* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
const char *fmt,
va_list ap)
{
- size_t width = (79 - (int)strlen(prefix));
+ size_t width = (79 - strlen(prefix));
if(!config->mute) {
size_t len;
char *ptr;
- char print_buffer[256];
+ char *print_buffer;
- len = vsnprintf(print_buffer, sizeof(print_buffer), fmt, ap);
+ print_buffer = curlx_mvaprintf(fmt, ap);
+ if(!print_buffer)
+ return;
+ len = strlen(print_buffer);
ptr = print_buffer;
while(len > 0) {
(void)fwrite(ptr, cut + 1, 1, config->errors);
fputs("\n", config->errors);
- ptr += cut+1; /* skip the space too */
+ ptr += cut + 1; /* skip the space too */
len -= cut;
}
else {
len = 0;
}
}
+ curl_free(print_buffer);
}
}