mirror of
https://github.com/curl/curl.git
synced 2026-07-16 02:07:16 +03:00
CURLOPT_DEBUGFUNCTION.3: do not assume nul-termination in example
Reported-by: Oskar Sigvardsson Bug: https://curl.se/mail/lib-2022-11/0016.html Closes #9862
This commit is contained in:
parent
af5a22a9c1
commit
ec4eec222b
1 changed files with 2 additions and 1 deletions
|
|
@ -125,7 +125,8 @@ int my_trace(CURL *handle, curl_infotype type,
|
|||
|
||||
switch (type) {
|
||||
case CURLINFO_TEXT:
|
||||
fprintf(stderr, "== Info: %s", data);
|
||||
fputs("== Info: ", stderr);
|
||||
fwrite(data, size, 1, stderr);
|
||||
default: /* in case a new one is introduced to shock us */
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue