]> git.ipfire.org Git - thirdparty/curl.git/commit
CURLOPT_HEADERDATA.3: warn DLL users must set write function
authorJay Satiro <raysatiro@yahoo.com>
Thu, 5 Jan 2023 07:14:53 +0000 (02:14 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Fri, 6 Jan 2023 08:45:17 +0000 (03:45 -0500)
commitd7b56ac75cd6e2ec6d501780e46f8bb3046ebd9f
tree3b28aa651dfcfd2e96ba04411450c9da74971957
parent1f693e0acac420b80984cbd90988ea6dd9a32bdb
CURLOPT_HEADERDATA.3: warn DLL users must set write function

- Warn that in Windows if libcurl is running from a DLL and if
  CURLOPT_HEADERDATA is set then CURLOPT_WRITEFUNCTION or
  CURLOPT_HEADERFUNCTION must be set as well, otherwise the user may
  experience crashes.

We already have a similar warning in CURLOPT_WRITEDATA. Basically, in
Windows libcurl could crash writing a FILE pointer that was created by
a different C runtime. In Windows each DLL that is part of a program may
or may not have its own C runtime.

Ref: https://github.com/curl/curl/issues/10231

Closes https://github.com/curl/curl/pull/10233
docs/libcurl/opts/CURLOPT_HEADERDATA.3