]> git.ipfire.org Git - thirdparty/curl.git/commit
curlx_win32_fopen: use `_fsopen()`/`_wfsopen()` with `_SH_DENYNO`
authorViktor Szakats <commit@vsz.me>
Mon, 5 Jan 2026 10:04:10 +0000 (11:04 +0100)
committerViktor Szakats <commit@vsz.me>
Tue, 6 Jan 2026 11:20:01 +0000 (12:20 +0100)
commite2d61a6b306cece5f194d70c05e55352f525dff9
treed900b2193509094f3ea18e98416b2d27e601dc25
parent64350280d3b9aca54856f73d109aab8f49615de3
curlx_win32_fopen: use `_fsopen()`/`_wfsopen()` with `_SH_DENYNO`

Replacing `fopen_s()`/`_wfopen_s()`, to allow customizing share mode,
and keep the sharing mode as was with `fopen()`/`_wopen()` earlier and
as used in `_sopen_s()`/`_wsopen_s()`.

The replaced functions used `_SH_SECURE` internally. Otherwise they are
identical to the replacements.

Ref: https://learn.microsoft.com/cpp/c-runtime-library/reference/fsopen-wfsopen

Reported-by: Jay Satiro
Fixes #20155
Ref: #20156
Follow-up to 1e7d0bafc6d25d98ec72ff419df65fda3cf147a7 #19643
Closes #20186
lib/curlx/fopen.c