diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-12-12 19:58:47 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-12-12 19:59:29 +0100 |
commit | 5d0ba70e17bde74d9a9108c38558f6491d2b5c4d (patch) | |
tree | 0a9fdd65752473c7d8420b6cf92cf9ae0111446f | |
parent | 188a43a8fd7976b1379516ad65cc84120d7907ea (diff) |
curl: support >256 bytes warning messsages
Bug: #2174
-rw-r--r-- | src/tool_msgs.c | 8 |
1 files 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); } } |