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:
parent
d70a5b5a0f
commit
9386e2a37a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user