summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-11-03 08:14:46 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-11-03 08:14:46 +0100
commit9386e2a37a8ebbaaf4b9880850e9d29931d02aa3 (patch)
treeb6a7035ce5fec71f7362836deed3f357e089bb09 /src
parentd70a5b5a0f5e36781a39e2c955139c81d41355c1 (diff)
downloadcurl-9386e2a37a8ebbaaf4b9880850e9d29931d02aa3.tar.gz
tool_debug_cb: do not assume zero-terminated data
Follow-up to d70a5b5a0f5e3
Diffstat (limited to 'src')
-rw-r--r--src/tool_cb_dbg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_cb_dbg.c b/src/tool_cb_dbg.c
index 1c42db8a5..69b459873 100644
--- a/src/tool_cb_dbg.c
+++ b/src/tool_cb_dbg.c
@@ -187,7 +187,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
switch(type) {
case CURLINFO_TEXT:
- fprintf(output, "%s== Info: %s", timebuf, data);
+ fprintf(output, "%s== Info: %.*s", timebuf, (int)size, data);
/* FALLTHROUGH */
default: /* in case a new one is introduced to shock us */
return 0;