Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CURLOPT_HEADERDATA.3: warn DLL users must set write function #10233

Closed
wants to merge 1 commit into from

Conversation

jay
Copy link
Member

@jay jay commented Jan 5, 2023

  • 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: #10231

Closes #xxxx

- 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: curl#10231

Closes #xxxx
@jay jay closed this in d7b56ac Jan 6, 2023
@jay jay deleted the docs_HEADERDATA_warn_win32_dll branch January 6, 2023 08:46
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
- 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: curl#10231

Closes curl#10233
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants