]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 months agocf-socket: use the right byte order for ports in bindlocal
Daniel Stenberg [Sat, 20 Sep 2025 14:56:14 +0000 (16:56 +0200)] 
cf-socket: use the right byte order for ports in bindlocal

Reported in Joshua's sarif data

Closes #18641

3 months agoschannel: assign result before using it
Daniel Stenberg [Sat, 20 Sep 2025 15:14:10 +0000 (17:14 +0200)] 
schannel: assign result before using it

curl_easy_strerror(result) was called *before* result was assigned.

Reported in Joshua's sarif data

Closes #18642

3 months agoCURLOPT_HEADER/WRITEFUNCTION.md: drop '* size' since size is always 1
Daniel Stenberg [Sat, 20 Sep 2025 14:47:16 +0000 (16:47 +0200)] 
CURLOPT_HEADER/WRITEFUNCTION.md: drop '* size' since size is always 1

Closes #18640

3 months agolibssh: error on bad chown number and store the value
Daniel Stenberg [Sat, 20 Sep 2025 13:00:37 +0000 (15:00 +0200)] 
libssh: error on bad chown number and store the value

To avoid continuing with an unintended zero uid. Also actually use the
value, which was omitted before!

Reported in Joshua's sarif data

Closes #18639

3 months agotftp: handle tftp_multi_statemach() return code
Daniel Stenberg [Sat, 20 Sep 2025 12:56:03 +0000 (14:56 +0200)] 
tftp: handle tftp_multi_statemach() return code

Previously just ignored.

Reported in Joshua's sarif data

Closes #18638

3 months agoftp: fix port number range loop for PORT commands
Daniel Stenberg [Sat, 20 Sep 2025 12:45:47 +0000 (14:45 +0200)] 
ftp: fix port number range loop for PORT commands

If the last port to test is 65535, the loop would previously wrongly
wrap the counter and start over at 0, which was not intended.

Reported in Joshua's sarif data

Closes #18636

3 months agosocks: make Curl_blockread_all return CURLcode
Daniel Stenberg [Sat, 20 Sep 2025 12:29:44 +0000 (14:29 +0200)] 
socks: make Curl_blockread_all return CURLcode

Reported in Joshua's sarif data

Closes #18635

3 months agoGHA/codeql: drop winbuild references [ci skip]
Viktor Szakats [Sat, 20 Sep 2025 13:07:15 +0000 (15:07 +0200)] 
GHA/codeql: drop winbuild references [ci skip]

Follow-up to 8d004781a577fc2fae72873c4a45b2fb3f366d98 #18040

3 months agobuild: avoid overriding system symbols for socket functions
Viktor Szakats [Tue, 9 Sep 2025 13:29:12 +0000 (15:29 +0200)] 
build: avoid overriding system symbols for socket functions

Before this patch `accept4()`, `socket()`, `socketpair()`, `send()` and
`recv()` system symbols were remapped via macros, using the same name,
to local curl debug wrappers. This patch replaces these overrides by
introducing curl-namespaced macros that map either to the system symbols
or to their curl debug wrappers in `CURLDEBUG` (TrackMemory) builds.

This follows a patch that implemented the same for `accept()`.

The old method required tricks to make these redefines work in unity
builds, and avoid them interfering with system headers. These tricks
did not work for system symbols implemented as macros.

The new method allows to setup these mappings once, without interfering
with system headers, upstream macros, or unity builds. It makes builds
more robust.

Also:
- checksrc: ban all mapped functions.
- docs/examples: tidy up checksrc rules.

Follow-up to 9863599d69b79d290928a89bf9160f4e4e023d4e #18502
Follow-up to 3bb5e58c105d7be450b667858d1b8e7ae3ded555 #17827

Closes #18503

3 months agorustls: typecast variable for safer trace output
Daniel Stenberg [Sat, 20 Sep 2025 09:17:48 +0000 (11:17 +0200)] 
rustls: typecast variable for safer trace output

This is a variadic function call with a mismatched argument type; on
platforms where uintptr_t and size_t differ, this invokes undefined
behavior.

Reported in Joshua's sarif data

Closes #18628

3 months agotool_cb_hdr: size is always 1
Daniel Stenberg [Sat, 20 Sep 2025 09:31:54 +0000 (11:31 +0200)] 
tool_cb_hdr: size is always 1

- add comment in the header that the argument 'size' is always 1,
  as guaranteed by the libcurl API

- then fix the call to fwrite() to avoid using "size, etag_length" which
  would be wrong if size was something else than 1, and use a fixed
  number there instead.

Reported in Joshua's sarif data

Closes #18630

3 months agolibssh: error on bad chgrp number
Daniel Stenberg [Sat, 20 Sep 2025 09:25:38 +0000 (11:25 +0200)] 
libssh: error on bad chgrp number

To avoid it continuing with a zero gid.

Reported in Joshua's sarif data

Closes #18629

3 months agocurl_slist_append.md: clarify that a NULL pointer is not acceptable
Daniel Stenberg [Sat, 20 Sep 2025 09:11:35 +0000 (11:11 +0200)] 
curl_slist_append.md: clarify that a NULL pointer is not acceptable

Closes #18627

3 months agotidy-up: update MS links, allow long URLs via `checksrc`
Viktor Szakats [Fri, 19 Sep 2025 20:22:14 +0000 (22:22 +0200)] 
tidy-up: update MS links, allow long URLs via `checksrc`

- update Microsoft documentation links.
  (also drop language designator where present.)

- checksrc: allow longer than 78 character lines if they
  contain a https URL. To make these links easier to use and parse.

- merge links that were split into two lines.

Closes #18626

3 months agobuild: address some `-Weverything` warnings, update picky warnings
Viktor Szakats [Thu, 4 Sep 2025 09:56:33 +0000 (11:56 +0200)] 
build: address some `-Weverything` warnings, update picky warnings

`-Weverything` is not enabled by curl, and not recommended by LLVM,
because it may enable experimental options, and will result in new
fallouts after toolchain upgrades. This patch aims to fix/silence as much
as possible as found with llvm/clang 21.1.0. It also permanently enables
warnings that were fixed in source and deemed manageable in the future.
`-Wformat` warnings are addressed separately via #18343.

Fix/silence warnings in the source:
- typecheck-gcc.h: fix `-Wreserved-identifier`.
- lib: silence `-Wcast-function-type-strict`.
  For llvm 16+ or Apple clang 16+.
- asyn-ares: limit `HAPPY_EYEBALLS_DNS_TIMEOUT` to old c-ares versions.
- curl_trc: fix `-Wc++-hidden-decl`.
- doh: fix `-Wc++-keyword`.
- ftp: fix `-Wreserved-identifier`.
- ldap: fix `-Wreserved-identifier`.
- mqtt: comment unused macro to avoid warning.
- multi_ev: drop unused macros to avoid warnings.
- setopt: fix useless `break;` after `return;`.
- gtls, mbedtls, rustls: silence `-Wconditional-uninitialized`.
- socks_sspi, schannel, x509asn1: fix `-Wimplicit-int-enum-cast`.
- x509asn1: fix `-Wc++-keyword`.
- openssl: scope `OSSL_UI_METHOD_CAST` to avoid unused macro warning.
- libssh2, wolfssl: drop unused macros.
- curl_ngtcp2, curl_quiche, httpsrr, urlapi: drop/limit unused macros.
- tool_getparam: fix useless `break;` after `return;` or `break;`.
  Not normally enabled because it doesn't work with unity.
  https://github.com/llvm/llvm-project/issues/71046
- tool_operate: fix `-Wc++-keyword`.
- curlinfo: fix a `-Wunsafe-buffer-usage`.
- tests: silence `-Wformat-non-iso`.
- lib557: fix `-Wreserved-identifier`.
- lib1565: silence `-Wconditional-uninitialized`.

Enable the above clang warnings permanently in picky mode:
- `-Wc++-hidden-decl`
- `-Wc++-keyword` (except for Windows, where it collides with `wchar_t`)
- `-Wcast-function-type-strict`
- `-Wcast-function-type`
- `-Wconditional-uninitialized`
- `-Wformat-non-iso` (except for clang-cl)
- `-Wreserved-identifier`
- `-Wtentative-definition-compat`

Silence problematic `-Weverything` warnings globally (in picky mode):
- `-Wused-but-marked-unused` (88000+ hits) and
  `-Wdisabled-macro-expansion` (2600+ hits).
  Triggered by `typecheck-gcc.h` when building with clang 14+.
  Maybe there exists a way to fix within that header?
  Ref: https://discourse.llvm.org/t/removing-wused-but-marked-unused/55310
- `-Wunsafe-buffer-usage`. clang 16+. 7000+ hits.
  May be useful in theory, but such high volume of hits makes it
  impractical to review and possibly address. Meant for C++.
  Ref: https://clang.llvm.org/docs/SafeBuffers.html
  Ref: https://stackoverflow.com/questions/77017567/how-to-fix-code-to-avoid-warning-wunsafe-buffer-usage
  Ref: https://discourse.llvm.org/t/rfc-c-buffer-hardening/65734
  Ref: https://github.com/llvm/llvm-project/pull/111624
- `-Wimplicit-void-ptr-cast`. clang 21+. 1700+ hits.
  C++ warning, deemed pure noise.
  Ref: https://github.com/curl/curl/issues/18470#issuecomment-3253506266
- `-Wswitch-default` (180+ hits), `-Wswitch-enum` (190+ hits),
  `-Wcovered-switch-default` (20+ hits).
  Next to impossible to fix cleanly, esp. when the covered `case`
  branches depend on compile-time options.
- `-Wdocumentation-unknown-command` (8+ hits).
  Triggered in a few sources. Seems arbitrary and bogus.
- `-Wpadded` (550+ hits).
- `-Wc++-keyword` on Windows, where it collides with `wchar_t`.
  (100+ hits)
  Ref: https://github.com/llvm/llvm-project/issues/155988
- `-Wreserved-macro-identifier`. clang 13+. 5+ hits.
  Sometimes it's necessary to set external macros that use
  the reserved namespace. E.g. `_CRT_NONSTDC_NO_DEPRECATE`,
  `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__`, `__NO_NET_API`,
  possibly `_REENTRANT`, and more.
  It's not worth trying to silence them individually.
- `-Wnonportable-system-include-path` with `clang-cl`.
  It'd be broken by doing what the warning suggests.
- `-Wformat-non-iso` for clang-cl.

CMake `PICKY_COMPILER=ON` (the default) or `./configure`
`--enable-warnings` (not the default) is required to enable these
silencing rules.

Also:
- autotools, cmake: fix Apple clang and mainline llvm version translations.
  Ref: https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
- autotools, cmake: enable `-Warray-compare` for clang 20+.
  Follow-up to 4b7accda5ae3f2e663aa3f3853805241ef87c2fe #17196
- cmake: fix to enable `-Wmissing-variable-declarations` at an earlier
  clang version.
- cmake: update internal logic to handle warning options with `+` in
  them.
- cmake: fix internal logic to match the whole option when looking
  into `CMAKE_C_FLAGS` for custom-disabled warnings.

Follow-up to b85cb8cb4e143d1615d4fcc1ce8f2f7b66453995 #18485

Closes #18477

3 months agowindows: stop passing unused, optional argument for Win9x compatibility
Viktor Szakats [Sun, 7 Sep 2025 19:42:41 +0000 (21:42 +0200)] 
windows: stop passing unused, optional argument for Win9x compatibility

Expiry timestamp in `AcquireCredentialsHandle()` (SSPI) and
`InitializeSecurityContext()` (Schannel) calls. The argument is optional
in both. The returned value was never used in curl. The reason for
passing it was Windows 95 compatibility, according to comments in
the SSPI code. curl no longer supports Windows 95.

Ref: https://learn.microsoft.com/windows/win32/api/sspi/nf-sspi-acquirecredentialshandlea
Ref: https://learn.microsoft.com/windows/win32/secauthn/initializesecuritycontext--schannel

Ref: 3fe531196771c8e81f917eebca4a06e062ab3a19
Ref: aaa42aa0d594b95c6c670a373ba30c507aa0a5ed

Closes #18490

3 months agotidy-up: avoid using the reserved macro namespace
Viktor Szakats [Fri, 5 Sep 2025 08:44:06 +0000 (10:44 +0200)] 
tidy-up: avoid using the reserved macro namespace

To avoid hitting `-Wreserved-macro-identifier` where possible.

- amigaos: introduce local macro instead of reusing `__request()`.
- easy_lock: avoid redefining `__has_builtin()`.
  Follow-up to 33fd57b8fff8c0d873da2316a2a7f911caac2bae #9062
- rand: drop interim macro `_random()`.
- windows: rename local macro `_tcsdup()` to `Curl_tcsdup()`.
  To avoid using the reserved macro namespace and to avoid
  colliding with `_tcsdup()` as defined by Windows headers.
- checksrc: ban `_tcsdup()` in favor of `Curl_tcsdup()`.
- tool_doswin: avoid redefining `_use_lfn()` (MS-DOS).
- tool_findfile: limit `__NO_NET_API` hack to AmigaOS.
  Syncing this pattern with `lib/netrc.c`.
  Follow-up to 784a8ec2c1a3cc4bd676077a28a0d5f6ee7786a5 #16279
- examples/http2-upload: avoid reserved namespace for local macro.

More cases will be removed when dropping WinCE support via #17927.

Cases remain when defining external macros out of curl's control.

Ref: #18477
Closes #18482

3 months agodigest_sspi: fix two memory leaks in error branches
Viktor Szakats [Sun, 7 Sep 2025 15:30:05 +0000 (17:30 +0200)] 
digest_sspi: fix two memory leaks in error branches

Closes #18488

3 months agocmake: add `CURL_CODE_COVERAGE` option
Viktor Szakats [Wed, 3 Sep 2025 12:32:29 +0000 (14:32 +0200)] 
cmake: add `CURL_CODE_COVERAGE` option

To sync up with the `--enable-code-coverage` `./configure` option.

Ref: https://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html
Ref: https://gcc.gnu.org/onlinedocs/gcc/Cross-profiling.html
Ref: https://clang.llvm.org/docs/SourceBasedCodeCoverage.html

Closes #18468

3 months agoautotools: make `--enable-code-coverage` support llvm/clang
Viktor Szakats [Wed, 3 Sep 2025 14:48:49 +0000 (16:48 +0200)] 
autotools: make `--enable-code-coverage` support llvm/clang

Cherry-picked from #18468

Closes #18473

3 months agowindows: replace `_beginthreadex()` with `CreateThread()`
Viktor Szakats [Fri, 1 Aug 2025 19:09:52 +0000 (21:09 +0200)] 
windows: replace `_beginthreadex()` with `CreateThread()`

Replace `_beginthreadex()` C runtime calls with native win32 API
`CreateThread()`. The latter was already used in `src/tool_doswin.c`
and in UWP and Windows CE builds before this patch. After this patch
all Windows flavors use it. To drop PP logic and simplify code.

While working on this it turned out that `src/tool_doswin.c` calls
`TerminateThread()`, which isn't recommended by the documentation,
except for "the most extreme cases". This patch makes no attempt
to change that code.
Ref: 9a2663322c330ff11275abafd612e9c99407a94a #17572
Ref: https://learn.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminatethread

Also:
- use `WaitForSingleObjectEx()` on all desktop Windows.
  Ref: 4be80d5109a340973dc6ce0221ec5c5761587df0
  Ref: https://sourceforge.net/p/curl/feature-requests/82/
  Ref: https://learn.microsoft.com/windows/win32/api/synchapi/nf-synchapi-waitforsingleobjectex
- tests: drop redundant casts.
- lib3207: fix to not rely on thread macros when building without thread
  support.

Assisted-by: Jay Satiro
Assisted-by: Marcel Raad
Assisted-by: MichaƂ Petryka
Follow-up to 38029101e2d78ba125732b3bab6ec267b80a0e72 #11625

Closes #18451

3 months agobuild: drop the winbuild build system
Viktor Szakats [Sun, 27 Jul 2025 11:50:03 +0000 (13:50 +0200)] 
build: drop the winbuild build system

In favor of CMake.

Closes #18040

3 months agobase64: accept zero length argument to base64_encode
Daniel Stenberg [Fri, 19 Sep 2025 11:47:16 +0000 (13:47 +0200)] 
base64: accept zero length argument to base64_encode

We used to treat 0 as "call strlen() to get the length" for
curlx_base64_encode, but it turns out this is rather fragile as we
easily do the mistake of passing in zero when the data is actually not
there and then calling strlen() is wrong.

Force the caller to pass in the correct size. A zero length input string
now returns a zero length output and a NULL pointer.

Closes #18617

3 months agogtls: avoid potential use of uninitialized variable in trace output
Daniel Stenberg [Fri, 19 Sep 2025 12:59:17 +0000 (14:59 +0200)] 
gtls: avoid potential use of uninitialized variable in trace output

Reported in Joshua's sarif data

Closes #18620

3 months agotool_getparam/set_rate: skip the multiplication on overflow
Daniel Stenberg [Fri, 19 Sep 2025 15:36:29 +0000 (17:36 +0200)] 
tool_getparam/set_rate: skip the multiplication on overflow

The code detected the problem but didn't avoid the calculation
correctly.

Fixes #18624
Reported-by: BobodevMm on github
Closes #18625

3 months agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 19 Sep 2025 14:47:01 +0000 (16:47 +0200)] 
RELEASE-NOTES: synced

and bump to 8.17.0

3 months agocookie: avoid saving a cookie file if no transfer was done
Daniel Stenberg [Fri, 19 Sep 2025 13:59:57 +0000 (15:59 +0200)] 
cookie: avoid saving a cookie file if no transfer was done

Because parts of the cookie loading happens on transfer start the
in-memory cookie jar risks being incomplete and then a save might
wrongly truncate the target file.

Added test 1902 to verify.

Reported-by: divinity76 on github
Fixes #18621
Closes #18622

3 months agotelnet: make printsub require another byte input
Daniel Stenberg [Fri, 19 Sep 2025 12:19:26 +0000 (14:19 +0200)] 
telnet: make printsub require another byte input

Reported in Joshua's sarif data

Closes #18618

3 months agocf_socket_recv: don't count reading zero bytes as first byte
Daniel Stenberg [Fri, 19 Sep 2025 11:23:14 +0000 (13:23 +0200)] 
cf_socket_recv: don't count reading zero bytes as first byte

Reported in Joshua's sarif data

Closes #18615

3 months agolibssh: react on errors from ssh_scp_read
Daniel Stenberg [Fri, 19 Sep 2025 11:35:23 +0000 (13:35 +0200)] 
libssh: react on errors from ssh_scp_read

Reported in Joshua's sarif data

Closes #18616

3 months agoGHA: tidy up actions/checkout version in comments [ci skip]
Viktor Szakats [Fri, 19 Sep 2025 12:20:14 +0000 (14:20 +0200)] 
GHA: tidy up actions/checkout version in comments [ci skip]

3 months agoGHA/codeql: try disabling the TRAP cache
Viktor Szakats [Fri, 19 Sep 2025 08:19:29 +0000 (10:19 +0200)] 
GHA/codeql: try disabling the TRAP cache

The `cpp` CodeQL job is adding a cache entry for each run on the master
branch. One for Linux, another for Windows. Size: 68MB + 180MB = 248MB.
In one week we got 50+ such entries, almost filling the available cache
space.

Following the recommendation in an open issue thread, this patch tries
to disable this cache. Since it only affects master, the effect can only
be verified after merging.

The latest cache is picked up in PRs. The performance impact is also to
be seen after merge.

Bug: https://github.com/curl/curl/pull/18528#issuecomment-3288950880
Ref: https://github.com/github/codeql-action/pull/1172
Ref: https://github.com/github/codeql-action/issues/2030
Ref: https://github.com/github/codeql-action/issues/2885#issuecomment-2879069087

Follow-up to cc50f05370981e4933504e8aaec6b15880ff847f #18528

Closes #18613

3 months agolibssh2: drop two redundant null-terminations
Viktor Szakats [Thu, 18 Sep 2025 21:25:28 +0000 (23:25 +0200)] 
libssh2: drop two redundant null-terminations

The null-termination was first added in the initial SFTP commit in 2006:
a634f644005cbe2b3dea2b84328d605ec3474054

At that time this was a reasonable concern because libssh2 started
null-terminating this string just one year prior, in 2005:
https://github.com/libssh2/libssh2/commit/efc3841fd2c2c945e96492e9089e4d1810709d53

This fix was released in libssh2 v0.13 (2006-03-02).

curl requires libssh2 v1.2.8, making this workaround no longer necessary.

Follow-up to 9f18cb6544bbf47e2e2fad6564bc03098273c7bc #18598

Closes #18606

3 months agotool_operate: keep the progress meter for --out-null
Daniel Stenberg [Fri, 19 Sep 2025 06:47:15 +0000 (08:47 +0200)] 
tool_operate: keep the progress meter for --out-null

Fixes #18607
Closes #18609

3 months agolibssh2: error check and null-terminate in ssh_state_sftp_readdir_link()
Viktor Szakats [Thu, 18 Sep 2025 12:02:51 +0000 (14:02 +0200)] 
libssh2: error check and null-terminate in ssh_state_sftp_readdir_link()

- null-terminate the result to match the other getter
  `libssh2_sftp_symlink_ex()` call.

- check negative result and bail out early.

Reported-by: Joshua Rogers
Closes #18598

3 months agoGHA/codeql: make it run on docs updates, to verify examples
Viktor Szakats [Thu, 18 Sep 2025 18:26:15 +0000 (20:26 +0200)] 
GHA/codeql: make it run on docs updates, to verify examples

Follow-up to b4922b1295333dc6679eb1d588ddc2fb6b7fd5b7 #18564

3 months agoexamples: fix two issues found by CodeQL
Viktor Szakats [Thu, 18 Sep 2025 16:50:09 +0000 (18:50 +0200)] 
examples: fix two issues found by CodeQL

- http2-upload: use `fstat()` to query file length to fix TOCTOU.

- ftpuploadresume: fix checking `sscanf()` return value.

Follow-up to b4922b1295333dc6679eb1d588ddc2fb6b7fd5b7 #18564
Closes #18605

3 months agotool_operate: Improve wording in retry message
Jay Satiro [Thu, 18 Sep 2025 15:38:20 +0000 (11:38 -0400)] 
tool_operate: Improve wording in retry message

- Use the plural 'seconds' for anything other than exactly 1 second.

Before: Will retry in 1.250 second.
After: Will retry in 1.250 seconds.

Follow-up to ca034e83.

Closes https://github.com/curl/curl/pull/18604

3 months agotftp: check and act on tftp_set_timeouts() returning error
Daniel Stenberg [Thu, 18 Sep 2025 15:32:39 +0000 (17:32 +0200)] 
tftp: check and act on tftp_set_timeouts() returning error

Reported-by: Joshua Rogers
Ref: https://github.com/curl/curl/pull/18574#issuecomment-3300183302
Closes #18603

3 months agotftp: propagate expired timer from tftp_state_timeout()
Joshua Rogers [Tue, 16 Sep 2025 19:52:28 +0000 (00:52 +0500)] 
tftp: propagate expired timer from tftp_state_timeout()

When Curl_timeleft() < 0 we used to return 0, masking the expiry and
skipping the caller’s (timeout_ms < 0) path. Now we set FIN and return
the negative value so tftp_multi_statemach() aborts with
CURLE_OPERATION_TIMEDOUT as intended.

Closes #18574

3 months agosocks_sspi: Fix some memory cleanup calls
Jay Satiro [Thu, 18 Sep 2025 06:07:17 +0000 (02:07 -0400)] 
socks_sspi: Fix some memory cleanup calls

- Ensure memory allocated by malloc() is freed by free().

Prior to this change SSPI's FreeContextBuffer() was sometimes used to
free malloc'd memory. I can only assume the reason we have no crash
reports about this is because the underlying heap free is probably the
same for both.

Reported-by: Joshua Rogers
Fixes https://github.com/curl/curl/issues/18587
Closes https://github.com/curl/curl/pull/18594

3 months agosasl: clear canceled mechanism instead of toggling it
Joshua Rogers [Tue, 16 Sep 2025 18:27:23 +0000 (23:27 +0500)] 
sasl: clear canceled mechanism instead of toggling it

Use &= ~authused in SASL_CANCEL (was ^=) to actually remove the offending
mechanism and avoid re-enabling a disabled mech on retry.

Closes #18573

3 months agoldap: do not base64 encode zero length string
Daniel Stenberg [Thu, 18 Sep 2025 13:50:17 +0000 (15:50 +0200)] 
ldap: do not base64 encode zero length string

Reported-by: Joshua Rogers
Closes #18602

3 months agoGHA/codeql: enable cares, debug, build curlinfo, examples
Viktor Szakats [Tue, 16 Sep 2025 09:47:38 +0000 (11:47 +0200)] 
GHA/codeql: enable cares, debug, build curlinfo, examples

Also build examples, out of curiousity, as an experiment, possibly
temporary. It needs around 40 seconds.

Closes #18564

3 months agoopenldap: avoid indexing the result at -1 for blank responses
Daniel Stenberg [Thu, 18 Sep 2025 13:02:03 +0000 (15:02 +0200)] 
openldap: avoid indexing the result at -1 for blank responses

Reported-by: Joshua Rogers
Closes #18600

3 months agosmb: adjust buffer size checks
Daniel Stenberg [Thu, 18 Sep 2025 12:49:09 +0000 (14:49 +0200)] 
smb: adjust buffer size checks

The checks did not account for the **two byte** 16bit read so risked
reading one more byte than what actually was received.

Reported-by: Joshua Rogers
Closes #18599

3 months agocfilter: unlink and discard
Stefan Eissing [Thu, 18 Sep 2025 09:10:45 +0000 (11:10 +0200)] 
cfilter: unlink and discard

Rewrite the code that removes a filter from the connection and discards
it. Always look at the connection, otherwise it will not work of the
filter is at the top of the chain.

Change QUIC filter setup code to always tear down the chain in
construction when an error occured.

HTTP proxy, do not remove the h1/h2 sub filter on close. Leave it to be
discarded with the connection. Avoids keeping an additional pointer that
might become dangling.

Triggered by a reported on a code bug in discard method.

Reported-by: Joshua Rogers
Closes #18596

3 months agotool: fix exponential retry delay
Daniel Stenberg [Thu, 18 Sep 2025 06:49:22 +0000 (08:49 +0200)] 
tool: fix exponential retry delay

Also, show retry delay with decimals since it might be not be integer
seconds.

Regression from da27db068fc888d7091d347080 (shipped in 8.16.0)

Reported-by: Andrew Olsen
Fixes #18591
Assisted-by: Jay Satiro
Closes #18595

3 months agosocks_sspi: restore non-blocking socket on error paths
Joshua Rogers [Wed, 17 Sep 2025 22:43:11 +0000 (03:43 +0500)] 
socks_sspi: restore non-blocking socket on error paths

Closes #18592

3 months agotool_cb_hdr: fix fwrite check in header callback
Joshua Rogers [Thu, 18 Sep 2025 01:45:12 +0000 (06:45 +0500)] 
tool_cb_hdr: fix fwrite check in header callback

Compare fwrite result to nmemb (items), not cb (bytes).

Closes #18593

3 months agosmtp: check EHLO responses case insensitively
Daniel Stenberg [Wed, 17 Sep 2025 21:22:36 +0000 (23:22 +0200)] 
smtp: check EHLO responses case insensitively

Adjust test 980 to announce starttls in lowercase.

Fixes #18588
Reported-by: Joshua Rogers
Closes #18589

3 months agomulti.h: add CURLMINFO_LASTENTRY
Christian Schmitz [Wed, 17 Sep 2025 08:11:59 +0000 (10:11 +0200)] 
multi.h: add CURLMINFO_LASTENTRY

For multiple enums, we use LASTENTRY values to do range checks when
receiving an option as integer. So I added LASTENTRY, so the check will
work, even if you add more options later.

Closes #18578

3 months agoconfigure: add "-mt" for pthread support on HP-UX
Michael Osipov [Wed, 17 Sep 2025 18:33:25 +0000 (20:33 +0200)] 
configure: add "-mt" for pthread support on HP-UX

HP-UX requires this compiler and linker flag to pass proper macros and
add required libraries.

Closes #18585

3 months agolibcurl-multi.md: added curl_multi_get_offt mention
Christian Schmitz [Wed, 17 Sep 2025 09:04:47 +0000 (11:04 +0200)] 
libcurl-multi.md: added curl_multi_get_offt mention

The multi interface page didn't mention the new curl_multi_get_offt
function.

Closes #18579

3 months agomanagen: render better manpage references/links
Daniel Stenberg [Wed, 17 Sep 2025 09:53:33 +0000 (11:53 +0200)] 
managen: render better manpage references/links

- When an option name is used in text, this script no longer outputs the
  short plus long version in the manpage output. It makes the text much
  more readable.

  This always showing both verions was previously done primarily to make
  sure roffit would linkify it correctly, but since roffit 0.17 it
  should link both long or short names correctly.

- When managen outputs generic text about options at the end of the
  description it now highlights them properly so that they too get
  linkified correctly in the HTML version. For consistency.

Closes #18580

3 months agomanagen: ignore version mentions < 7.66.0
Daniel Stenberg [Wed, 17 Sep 2025 11:02:01 +0000 (13:02 +0200)] 
managen: ignore version mentions < 7.66.0

Only mention version specific details for versions from within the last
six years.

Closes #18583

3 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 17 Sep 2025 08:30:31 +0000 (10:30 +0200)] 
RELEASE-NOTES: synced

3 months agosetopt: make CURLOPT_MAXREDIRS accept -1 (again)
Daniel Stenberg [Wed, 17 Sep 2025 06:25:42 +0000 (08:25 +0200)] 
setopt: make CURLOPT_MAXREDIRS accept -1 (again)

Regression from b059f7d (shipped in 8.16.0)

Reported-by: Adam Light
Fixes #18571
Closes #18576

3 months agodocs/libcurl: use lowercase must
Daniel Stenberg [Tue, 16 Sep 2025 14:49:54 +0000 (16:49 +0200)] 
docs/libcurl: use lowercase must

To shout less. Use bold in some places.

Closes #18570

3 months agoGHA: update openssl/openssl to v3.5.3
renovate[bot] [Tue, 16 Sep 2025 12:13:10 +0000 (12:13 +0000)] 
GHA: update openssl/openssl to v3.5.3

Closes #18566

3 months agodocs/libcurl: clarify some timeout option behavior
Daniel Stenberg [Tue, 16 Sep 2025 14:30:08 +0000 (16:30 +0200)] 
docs/libcurl: clarify some timeout option behavior

Closes #18569

3 months agoaws-lc: re-enable large read-ahead with v1.61.0 again
Stefan Eissing [Tue, 16 Sep 2025 13:49:58 +0000 (15:49 +0200)] 
aws-lc: re-enable large read-ahead with v1.61.0 again

AWS-LC fixed a bug with large read ahead buffers in v1.61.0. Check a
define introduced in that version to enable the large read ahead again.

AWS-LC issue: https://github.com/aws/aws-lc/issues/2650

Closes #18568

3 months agosws: fix checking `sscanf()` return value
Viktor Szakats [Tue, 16 Sep 2025 10:47:27 +0000 (12:47 +0200)] 
sws: fix checking `sscanf()` return value

Closes #18565

3 months agocmake: fix building docs when the base directory contains `.3`
Viktor Szakats [Tue, 16 Sep 2025 08:49:14 +0000 (10:49 +0200)] 
cmake: fix building docs when the base directory contains `.3`

Fixing:
```
ninja: error: '<...>/basedir.md/_bld/docs/libcurl/libcurl-symbols.md',
  needed by 'docs/libcurl/curl_easy_cleanup.3', missing and no known rule to make it
```

Reported-by: Nir Azkiel
Fixes #18560
Follow-up to 898b012a9bf388590c4be7f526815b5ab74feca1 #1288
Closes #18563

3 months agoMakefile.example: simplify and make it configurable
Viktor Szakats [Mon, 15 Sep 2025 13:01:54 +0000 (15:01 +0200)] 
Makefile.example: simplify and make it configurable

- build in a single step.

- allow overriding all variables:
  source, target, compiler, libpaths, libs, flags.

Example:
```shell
LIBS= LDFLAGS= SRC=altsvc.c make -f Makefile.example
```

Closes #18554

3 months agoGHA/codeql: enable more build options, build servers and tunits
Viktor Szakats [Mon, 15 Sep 2025 19:03:52 +0000 (21:03 +0200)] 
GHA/codeql: enable more build options, build servers and tunits

- add HTTP/3 build with OpenSSL 3.5, nghttp3 and ngtcp2.
- enable GSASL, Heimdal, rtmp, SSLS-export.
- make one build MultiSSL with GnuTLS, mbedTLS, Rustls, wolfSSL.
- build servers (also on Windows), and tunits.
- use Linuxbrew to install build dependencies missing from Ubuntu.

Coverage is now 466 C files. (was: 446)

Closes #18557

3 months agokrb5: return appropriate error on send failures
Daniel Stenberg [Tue, 16 Sep 2025 08:27:42 +0000 (10:27 +0200)] 
krb5: return appropriate error on send failures

Closes #18561

3 months agoGHA: Update nghttp2/nghttp2 to v1.67.1
renovate[bot] [Mon, 15 Sep 2025 12:00:44 +0000 (12:00 +0000)] 
GHA: Update nghttp2/nghttp2 to v1.67.1

Closes #18552

3 months agoGHA: bump actions/checkout from 4.2.2 to 5.0.0
dependabot[bot] [Mon, 15 Sep 2025 14:56:28 +0000 (14:56 +0000)] 
GHA: bump actions/checkout from 4.2.2 to 5.0.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.2.2...08c6903cd8c0fde910a37f88322edcfb5dd907a8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Closes #18556

3 months agoGHA/codeql: tidy up config names
Viktor Szakats [Mon, 15 Sep 2025 13:21:30 +0000 (15:21 +0200)] 
GHA/codeql: tidy up config names

Before this patch there was a single C config detected, named `build:`.

Closes #18555

3 months agotidy-up: whitespace
Viktor Szakats [Tue, 2 Sep 2025 12:20:26 +0000 (14:20 +0200)] 
tidy-up: whitespace

Closes #18553

3 months agoCURLOPT_TIMECONDITION.md: works for FILE and FTP as well
Daniel Stenberg [Mon, 15 Sep 2025 10:51:58 +0000 (12:51 +0200)] 
CURLOPT_TIMECONDITION.md: works for FILE and FTP as well

Closes #18551

3 months agocmdline-docs: extended, clarified, refreshed
Daniel Stenberg [Mon, 15 Sep 2025 08:33:19 +0000 (10:33 +0200)] 
cmdline-docs: extended, clarified, refreshed

Closes #18550

3 months agodist: do not distribute `CI.md`
Viktor Szakats [Sun, 14 Sep 2025 21:59:41 +0000 (23:59 +0200)] 
dist: do not distribute `CI.md`

`CI.md` slipped into the 8.15.0, 8.16.0 tarballs by accident.
Remove it again and update the checker exception.

Follow-up to fa3f889752e6b5034966de61a372a60773a69ca8 #17463

Closes #18549

3 months agoasyn-thrdd: drop pthread_cancel
Stefan Eissing [Sat, 13 Sep 2025 13:25:53 +0000 (15:25 +0200)] 
asyn-thrdd: drop pthread_cancel

Remove use of pthread_cancel in asnyc threaded resolving. While there
are system where this works, others might leak to resource leakage
(memory, files, etc.). The popular nsswitch is one example where resolve
code can be dragged in that is not prepared.

The overall promise and mechanism of pthread_cancel() is just too
brittle and the historcal design of getaddrinfo() continues to haunt us.

Fixes #18532
Reported-by: Javier Blazquez
Closes #18540

3 months agosetopt: accept *_SSL_VERIFYHOST set to 2L
Daniel Stenberg [Sun, 14 Sep 2025 21:28:03 +0000 (23:28 +0200)] 
setopt: accept *_SSL_VERIFYHOST set to 2L

... without outputing a verbose message about it. In the early days we
had 2L and 1L have different functionalities.

Reported-by: Jicea
Bug: https://curl.se/mail/lib-2025-09/0031.html
Closes #18547

3 months agoCURLOPT_SSL_VERIFYHOST.md: add see-also to two other VERIFYHOST options
Daniel Stenberg [Sun, 14 Sep 2025 21:30:13 +0000 (23:30 +0200)] 
CURLOPT_SSL_VERIFYHOST.md: add see-also to two other VERIFYHOST options

Closes #18548

3 months agotool_getparam: split opt_filestring into two sep functions
Daniel Stenberg [Sun, 14 Sep 2025 12:29:13 +0000 (14:29 +0200)] 
tool_getparam: split opt_filestring into two sep functions

One for file name arguments and one for "strings".

Closes #18546

3 months agoGHA/codeql: analyse Windows Schannel WinIDN build
Viktor Szakats [Sun, 14 Sep 2025 12:14:34 +0000 (14:14 +0200)] 
GHA/codeql: analyse Windows Schannel WinIDN build

Follow-up to cc50f05370981e4933504e8aaec6b15880ff847f #18528

Closes #18545

3 months agoGHA/distcheck: disable `man-db/auto-update`
Viktor Szakats [Sun, 14 Sep 2025 10:38:29 +0000 (12:38 +0200)] 
GHA/distcheck: disable `man-db/auto-update`

Make sure to not rebuild man pages after purging system curl, to make
the job faster and avoid timeouts:
```
Sun, 14 Sep 2025 10:16:28 GMT Removing curl (8.5.0-2ubuntu10.6) ...
Sun, 14 Sep 2025 10:16:28 GMT Processing triggers for man-db (2.12.0-4build2) ...
Sun, 14 Sep 2025 10:21:22 GMT (Reading database ... 218629 files and directories currently installed.)
```
Ref: https://github.com/curl/curl/actions/runs/17709785947/job/50326910814?pr=18535#step:3:19

Closes #18544

3 months agoTODO: remove already implemented or bad items
Daniel Stenberg [Sun, 14 Sep 2025 09:44:35 +0000 (11:44 +0200)] 
TODO: remove already implemented or bad items

- remove "connect to multiple IPs in parallel"
- remove "CURLOPT_RESOLVE for any port number", It can already be
  accomplished with CURLOPT_CONNECT_TO
- remove "dynamically load modules", we don't believe in this
- remove "netrc caching and sharing", we already cache it
- remove "Offer API to flush the connection pool", this is effectively
  what CURLMOPT_NETWORK_CHANGED now allows
- remove "WebSocket read callback", introduced in 8.16.0

Closes #18542

3 months agoappveyor: bump to OpenSSL 3.5, adjust to dropped 1.1.1 on VS2019
Viktor Szakats [Sun, 14 Sep 2025 09:55:50 +0000 (11:55 +0200)] 
appveyor: bump to OpenSSL 3.5, adjust to dropped 1.1.1 on VS2019

- bump OpenSSL 3.4 to 3.5 on VS2022 runners.

- bump OpenSSL 1.1.1 to 3.0 on VS2019 runners.
  1.1.1 is documented to be present, but missing.
  Fixes:
  ```
  + cmake -G 'Visual Studio 16 2019' -A x64 [...] -DOPENSSL_ROOT_DIR=C:/OpenSSL-v111-Win64 [...]
  CMake Error at C:/Program Files/CMake/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
    Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
    system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
    OPENSSL_INCLUDE_DIR)
  Call Stack (most recent call first):
    CMakeLists.txt:757 (find_package)
  ```
  Ref: https://ci.appveyor.com/project/curlorg/curl/builds/52740431/job/tq6h4xhqpa3vgq47?fullLog=true
  Ref: https://www.appveyor.com/docs/windows-images-software/
  Ref: https://github.com/appveyor/website/commit/9a739f7bce4a624b28ff382d58a9ebc507ab0f78

Closes #18543

3 months agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 14 Sep 2025 08:33:38 +0000 (10:33 +0200)] 
RELEASE-NOTES: synced

3 months agoGHA: document permissions as required by zizmor 1.13.0
Viktor Szakats [Sat, 13 Sep 2025 15:20:22 +0000 (17:20 +0200)] 
GHA: document permissions as required by zizmor 1.13.0

Ref: https://github.com/zizmorcore/zizmor/pull/1131
Ref: https://docs.zizmor.sh/audits/#undocumented-permissions

Bug: https://github.com/curl/curl/pull/18539#issuecomment-3288151910

Closes #18541

3 months agoGHA/codeql: re-enable for C with the default query pack
Viktor Szakats [Thu, 11 Sep 2025 17:50:40 +0000 (19:50 +0200)] 
GHA/codeql: re-enable for C with the default query pack

Earlier we used `security-extended` and tried `security-and-quality`.
Try the default to see how it works.

CodeQL no longer uses the project's Actions cache, also fixing
the previously seen repeat cache entry issue.

- switch to `manual` build. It's 3x faster than the default `autobuild`.
- enable more dependencies to increase coverage.
- docs/tests/CI.md: re-add CodeQL.

Ref: https://docs.github.com/en/code-security/code-scanning/managing-your-code-scanning-configuration/codeql-query-suites
Ref: https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
Ref: #16263
Ref: 173805b2e76960de5c51fd5fe64286d8ac81f1ff #15798

Closes #18528

3 months agolibcurl-security.md: mention long-running connections 18533/head
Dan Fandrich [Fri, 12 Sep 2025 07:10:20 +0000 (00:10 -0700)] 
libcurl-security.md: mention long-running connections

Some applications may want to periodically recheck the remote server
certificate, which doesn't happen on a long-running connection.

Ref: #18527
Closes #18533

3 months agodocs/libcurl: remove ancient version references
Daniel Stenberg [Thu, 11 Sep 2025 21:16:55 +0000 (23:16 +0200)] 
docs/libcurl: remove ancient version references

To make the texts easier on the eye.

- Remove most free text references to curl versions before 7.60.0 (May
  2018)
- Leave those present in a HISTORY section

Most of them are already documented in symbols-in-versions anyway.

Closes #18530

3 months agoCURLINFO_FTP_ENTRY_PATH.md: this is for SFTP as well
Daniel Stenberg [Thu, 11 Sep 2025 21:46:34 +0000 (23:46 +0200)] 
CURLINFO_FTP_ENTRY_PATH.md: this is for SFTP as well

Closes #18531

3 months agourldata: FILE is not a list-only protocol
Daniel Stenberg [Thu, 11 Sep 2025 14:52:40 +0000 (16:52 +0200)] 
urldata: FILE is not a list-only protocol

The struct field thus does not depend on the presence of it

Closes #18525

3 months agoCURLOPT_MAXLIFETIME_CONN: make default 24 hours
Daniel Stenberg [Thu, 11 Sep 2025 15:50:59 +0000 (17:50 +0200)] 
CURLOPT_MAXLIFETIME_CONN: make default 24 hours

Set a default value to only reuse existing connections if less than 24
hours old. This makes the TLS certificate check get redone for the new
connection. An application can still set it to zero.

Closes #18527

3 months agoGHA/http3-linux: fix nghttpx build and other tweaks
Viktor Szakats [Thu, 11 Sep 2025 13:05:28 +0000 (15:05 +0200)] 
GHA/http3-linux: fix nghttpx build and other tweaks

- fix `nghttp2` build to also build the `nghttpx` application.
  Restore required `libc-ares-dev`. Also confirm that `libev-dev` is
  required too. Document these requirements.
  Follow-up to 0455d8772a1af20ce63c46c5738582aa9b1b8441 #18509

- explicitly enable `nghttpx` for the `nghttp2` build to make it fail if
  requirements aren't met:
  ```
  configure: error: applications were requested (--enable-app) but dependencies are not met.
  ```

- explicitly install brotli, zstd, zlib for the dependency builds.
  Of these, zstd and zlib are preinstalled. zlib is required for
  `nghttpx`. zstd and brotli doesn't seem to be used, but keep them
  there just in case and to match the test env.
  Follow-up to 0455d8772a1af20ce63c46c5738582aa9b1b8441 #18509

- enable brotli for `nghttpx`. It doesn't change the tests, and also
  cost almost nothing, so I figure why not.

Closes #18522

3 months agossl-sessions.md: mark option experimental
Daniel Stenberg [Thu, 11 Sep 2025 14:09:45 +0000 (16:09 +0200)] 
ssl-sessions.md: mark option experimental

Also make managen output the experimental text with the correct
prefix/margin for the ascii version.

Closes #18523

3 months agongtcp2: check error code on connect failure
Stefan Eissing [Thu, 11 Sep 2025 12:12:04 +0000 (14:12 +0200)] 
ngtcp2: check error code on connect failure

Access the error codes of ngtcp2 when a connect attempt failes. Trace
the information for analysis. Treat errors as permanent failure by
default, trigger retrying only when the server refused without
indicating an error.

Closes #18521

3 months agoquic: fix min TLS version handling
Stefan Eissing [Thu, 11 Sep 2025 10:59:22 +0000 (12:59 +0200)] 
quic: fix min TLS version handling

When switching to TSLv1.2 as default in
9d8998c99408e1adf8eba629fad9f87b3235bdfa, this led to an explicit
setting of 1.2 on QUIC connections when using quictls, overriding the
already set min version of 1.3.

This leads to a ClientHello with TLS 1.2+1.3 offered on a QUIC connect
which is rejected by the Caddy server. Using ngtcp2 with OpenSSL 3.5+,
GnuTLS or AWS-LC is not affected.

Fixes #18518
Reported-by: fds242 on github
Closes #18520

3 months agoGHA/windows: drop repeated word from comment
Viktor Szakats [Thu, 11 Sep 2025 13:02:57 +0000 (15:02 +0200)] 
GHA/windows: drop repeated word from comment

3 months agoGHA: fix and tweak installed packages for http3-linux and Windows-cross
Viktor Szakats [Thu, 11 Sep 2025 09:20:08 +0000 (11:20 +0200)] 
GHA: fix and tweak installed packages for http3-linux and Windows-cross

- explicitly install `libldap-dev` to not rely on test-specific packages
  installing it implicitly, to have the same `curl -V` output for each
  TLS backend build pair.
  Follow-up to 0455d8772a1af20ce63c46c5738582aa9b1b8441 #18509

- install `libev-dev` for tests. It's a runtime dependency for
  the local build of `nghttpx`. Missing it made pytest skip 178 tests.
  Also skewing the 'Gain' time. I estimate it to account for 3 minutes,
  making the total gain ~20 minutes.
  Follow-up to 0455d8772a1af20ce63c46c5738582aa9b1b8441 #18509
  (It may be a better solution to disable libev for the local nghttp2
  build, to avoid this hidden dependency.)

- fix quiche jobs to use the local build of `libnghttp2`.

- stop installing the `clang` package for Windows-cross. `clang` and
  `clang-tidy` tools are preinstalled on the Ubuntu 24.04 runner.

Closes #18519

3 months agoGHA: update github/codeql-action digest to 192325c
renovate[bot] [Wed, 10 Sep 2025 18:40:05 +0000 (18:40 +0000)] 
GHA: update github/codeql-action digest to 192325c

Closes #18516

3 months agoGHA: update rojopolis/spellcheck-github-actions digest to 739a1e3
renovate[bot] [Wed, 10 Sep 2025 16:54:27 +0000 (16:54 +0000)] 
GHA: update rojopolis/spellcheck-github-actions digest to 739a1e3

Closes #18515

3 months agoGHA: minimize installed packages in http3-linux and Windows cross-builds
Viktor Szakats [Wed, 10 Sep 2025 08:25:17 +0000 (10:25 +0200)] 
GHA: minimize installed packages in http3-linux and Windows cross-builds

In the last couple of months some jobs started taking a lot of time and
often timing out due to slow `apt install` from the Azure Ubuntu mirror.

The jobs affected were those that installed large packages:
GHA/http3-linux and the 3 cross-build jobs in GHA/windows.

This patch reduces the installed packaged to the minimum required
to complete the jobs. Saving a minute+ for each http3-linux job (a total
of 20+ minutes for the workflow.) Also saving bandwidth and reducing
the chance for long downloads or timeouts with slow Azure repos.

Details:
- http3: delete redundant packages from the `build-cache` job.
- http3: install gnutls dependencies for gnutls jobs only.
- http3: do not install test dependencies in jobs not running tests.
- http3: drop redundant packages from the curl jobs.
- Windows-cross: replace `mingw-w64` with `gcc-mingw-w64-x86-64-win32`
  for the 3 Windows cross-build job. Dropping C++, 32-bit, and 64-bit
  POSIX-threaded parts. Saving time and significant bandwidth for each
  of the 3 jobs:
  Download size: 277 MB -> 65 MB (installed: 1300 MB -> 400 MB)
- Windows-cross: restore previous job time limit of 15m (from 45m)
  Follow-up to ff5140a25f42fef80325c6e28c4802fdb7e06386 #18163

Before:
https://github.com/curl/curl/actions/runs/17611514207 (http3)
https://github.com/curl/curl/actions/runs/17611514185/job/50034354923 (Windows cross)

After:
https://github.com/curl/curl/actions/runs/17628406362?pr=18509 (http3)
https://github.com/curl/curl/actions/runs/17627562551/job/50088055529?pr=18509 (Windows cross)

http3 job           |    Bef. |    Aft. |
:------------------ | ------: | ------: |
Build caches (hot)  |     10s |     12s |
AM awslc            |  3m  0s |  1m 54s |
CM awslc            |  4m 32s |  3m  4s |
AM boringssl        |  3m  9s |  1m 48s |
CM boringssl        |  3m 43s |  3m  2s |
AM gnutls           |  3m  9s |  2m 18s |
CM gnutls           |  4m 19s |  2m 55s |
AM libressl         |  2m 14s |  1m 24s |
CM libressl         |  5m 30s |  2m 57s |
AM openssl          |  5m 16s |  4m 17s |
CM openssl          |  1m 50s |  1m 47s |
AM openssl-quic     |  2m 58s |  1m  7s |
CM openssl-quic     |  4m 16s |  2m 43s |
AM quiche           |  2m 54s |  1m 34s |
CM quiche           |  5m  0s |  3m 15s |
AM quictls          |  2m 34s |  1m 13s |
CM quictls          |  4m 20s |  3m 17s |
AM wolfssl          |  2m 48s |  1m 30s |
CM wolfssl          |  4m 49s |  3m 22s |
Total:              | 66m 21s | 43m 27s |
Gain:               |         | 22m 54s |

Out of curiousity, build times as seen in the http3 build-cache job:
- TLS backends:
  - openssl: 2m25s
  - libressl: 27s
  - aws-lc: 41s
  - boringssl: 1m8s
  - quictls: 1m46s
  - gnutls: 6m30s
  - wolfssl: 51s
  - quiche + boringssl: 1m9s
- ng* libs (not yet optimized for build speed):
  - nghttp3: 13s
  - ngtcp2: 52s (with 6 backends, 3 runs)
  - ngtcp2: 19s (boringssl)
  - nghttp2: 21s
Ref: https://github.com/curl/curl/actions/runs/17626120054/job/50083344805

A similar effort in curl-for-win, affecting 2 GHA/curl-for-win Windows
jobs (though they use the default Debian repo, with no issues):
- with llvm/clang:
  Download size: 648 MB -> 430 MB (installed: 3344 MB -> 2333 MB)
- with gcc:
  Download size: 550 MB -> 328 MB (installed: 2815 MB -> 1804 MB)
Ref: https://github.com/curl/curl-for-win/commit/e19665d9486bdca60f996ed2e198a66128cfba38
Ref: https://github.com/curl/curl-for-win/commit/6b14c3946a8c89dc1d3847afc9501fc71f3ac628

Bug: https://github.com/curl/curl/pull/18502#issuecomment-3270259744

Closes #18509

3 months agocurl_mem_undef.h: limit to `CURLDEBUG` for non-memalloc overrides
Viktor Szakats [Wed, 10 Sep 2025 10:48:06 +0000 (12:48 +0200)] 
curl_mem_undef.h: limit to `CURLDEBUG` for non-memalloc overrides

To fix non-`CURLDEBUG` builds on 32-bit AIX, where `fopen` is a system
macro.

Ref: #18502
Ref: https://github.com/curl/curl/pull/18502/commits/793a375ce3002454599ffe2d7b561b6340103306

Follow-up to 3bb5e58c105d7be450b667858d1b8e7ae3ded555 #17827
Reported-by: Andrew Kirillov
Fixes #18510
Closes #18514