1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

tool_debug_cb: do not assume zero-terminated data

Follow-up to d70a5b5a0f
This commit is contained in:
Daniel Stenberg 2020-11-03 08:14:46 +01:00
parent d70a5b5a0f
commit 9386e2a37a
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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;