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
@ -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…
Reference in New Issue
Block a user