CURLSHOPT_(UN)SHARE.md: do not modify shares while in use

Reported-by: smaeljaish on hackerone

Closes #22217
This commit is contained in:
Daniel Stenberg 2026-06-29 17:41:34 +02:00
parent ea71c3b6b6
commit 7791b1629b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 6 additions and 0 deletions

View file

@ -35,6 +35,9 @@ CURLSHOPT_SHARE(3) multiple times with different data arguments to have
the share object share multiple types of data. Unset a type again by setting
CURLSHOPT_UNSHARE(3).
Do not add types to a shared object that is being in use. Add them only
between transfers.
If any of the data is to be shared in multiple threads then mutex callbacks
must be set as well. See CURLSHOPT_LOCKFUNC(3) and CURLSHOPT_UNLOCKFUNC(3).

View file

@ -36,6 +36,9 @@ below. You can set CURLSHOPT_UNSHARE(3) multiple times with different
data arguments to remove multiple types from the shared object. Add data to
share again with CURLSHOPT_SHARE(3).
Do not remove types from a shared object that is being in use. Unshare them
only between transfers.
## CURL_LOCK_DATA_COOKIE
Cookie data is no longer shared across the easy handles using this shared