From 5d0ba70e17bde74d9a9108c38558f6491d2b5c4d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 12 Dec 2017 19:58:47 +0100 Subject: curl: support >256 bytes warning messsages Bug: #2174 --- src/tool_msgs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tool_msgs.c b/src/tool_msgs.c index 07bf81292..91d62ec1e 100644 --- a/src/tool_msgs.c +++ b/src/tool_msgs.c @@ -42,9 +42,12 @@ static void voutf(struct GlobalConfig *config, 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) { @@ -71,6 +74,7 @@ static void voutf(struct GlobalConfig *config, len = 0; } } + curl_free(print_buffer); } } -- cgit v1.2.3