aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tool_msgs.c8
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);
}
}