Commit Graph

37563 Commits

Author SHA1 Message Date
Viktor Szakats
60186cec78 openldap: avoid forward declarations in ldaps code
Follow-up to b85cb8cb4e #18485

Closes #20293
2026-01-13 18:13:32 +01:00
Viktor Szakats
b6298a2336 mod_curltest: silence unused argument compiler warning
Closes #20292
2026-01-13 17:43:35 +01:00
Viktor Szakats
c446ada2a6 md4, md5: drop redundant forward declarations
Closes #20291
2026-01-13 17:43:35 +01:00
Viktor Szakats
f6a83894eb lib: reorder protocol functions to avoid forward declarations (ssh)
Move protocol handler table to the end of sources, rearrange static
functions in reverse dependency order as necessary.

Closes #20290
2026-01-13 17:43:35 +01:00
Viktor Szakats
7d2c65e6ee lib: reorder protocol functions to avoid forward declarations (misc cont.)
For protocols: ldap, openldap, rtmp, rtsp, telnet

Move protocol handler table to the end of sources, rearrange static
functions in reverse dependency order as necessary.

Closes #20289
2026-01-13 17:43:34 +01:00
Viktor Szakats
060e479a19 imap: check imap_sendf() printf masks at compile-time
Closes #20287
2026-01-13 14:27:27 +01:00
Viktor Szakats
80739fa89d tests/server: use CURL_PRINTF(), drop -Wformat-nonliteral workaround
Closes #20286
2026-01-13 14:27:27 +01:00
Daniel Stenberg
236c7d3c4d curl_easy_nextheader.md: a new transfer invalidates 'prev'
Closes #20285
2026-01-13 14:11:15 +01:00
Daniel Stenberg
db86f2de9b tftp: correct the filename length check
Reported-by: z2_
Bug: https://hackerone.com/reports/3508321
Closes #20283
2026-01-13 11:16:47 +01:00
Daniel Stenberg
8582ecf5bb setopt: split up setopt_long and setopt_cptr
- Split setopt_long() into multiple functions
  (setopt_long_bool/net/http/proxy/ssl/proto/misc) and dispatch them
  using a small function table

- Extract proxy string option handling into setopt_cptr_proxy() and call
  it early from setopt_cptr()

- Reorder options to simplify #ifdef blocks and reduce per-function size

- Updates code paths to return CURLE_UNKNOWN_OPTION from helper defaults
  so dispatching can continue cleanly

Closes #20280
2026-01-13 09:55:09 +01:00
Daniel Stenberg
f057ed05be checksrc: warn for leading spaces before the preprocessor hash
Fix the 40+ fallouts

Closes #20282
2026-01-13 09:52:26 +01:00
Daniel Stenberg
dac98ccfa2 mqtt: better too-big-message-check
Reported-by: gudyuu on hackerone
Reviewed-by: Daniel Gustafsson
Bug: https://hackerone.com/reports/3508500
Closes #20281
2026-01-13 09:46:49 +01:00
Daniel Stenberg
4b566d8310 top-complexity: always show the top-25
Accept argument as a custom amount. Previously it showed all functions
with a complexity score above 57. This way it adapts better as we
gradually decrease complexity in functions.

Closes #20273
2026-01-13 07:32:53 +01:00
Viktor Szakats
9570d53b75 lib: reorder protocol functions to avoid forward declarations (ftp)
There remains 4 forward declarations.

Move protocol hander table to the end of sources, rearrange static
functions is reverse dependency order as possible.

Closes #20276
2026-01-13 01:31:27 +01:00
Viktor Szakats
2ded1e3c6e lib: reorder protocol functions to avoid forward declarations (email)
For protocols: imap, pop3, smtp.

Move protocol hander table to the end of sources, rearrange static
functions is reverse dependency order as necessary.

Closes #20275
2026-01-13 01:31:27 +01:00
Viktor Szakats
07926b5982 lib: reorder protocol functions to avoid forward declarations (misc)
For protocols: dict, file, gopher, tftp, http, mqtt, smb.

Move protocol hander table to the end of sources, rearrange static
functions is reverse dependency order as necessary.

Closes #20274
2026-01-13 01:31:27 +01:00
Viktor Szakats
3ee1d3b573 tidy-up: merge root packages directory into projects
To simplify the directory layout.

- OS400 and vms support move from `packages` to `projects`.

- Windows README and `generate.bat` files move from `projects`
  to `projects/Windows`.

Closes #20271
2026-01-12 23:49:35 +01:00
Daniel Stenberg
0d4beb26d2 RELEASE-NOTES: synced 2026-01-12 23:18:48 +01:00
Viktor Szakats
e52e6dac8e spacecheck: show line numbers of duplicate empty lines
Also:
- drop separate check for 3 or more consecutive empty lines.

Ref: https://github.com/curl/curl/pull/20266#issuecomment-3738955165

Closes #20269
2026-01-12 22:21:01 +01:00
Viktor Szakats
27a1e629b5 Makefile.am: drop stray VC project files from dist
Most files were removed 2 years ago, the remaining two do not work
without those.

Follow-up to 3d93d18ded #12288

Closes #20272
2026-01-12 22:19:40 +01:00
Viktor Szakats
716637520d Makefile.am: delete RPM targets referencing non-existent files
Follow-up to bae0d473f5 #3331

Closes #20270
2026-01-12 22:19:40 +01:00
Jay Satiro
3652127e81 tool_cb_hdr: suppress header output when --out-null
This change brings --out-null more in line with the documentation which
says --out-null is expected to behave like a portable -o /dev/null.

Prior to this change curl did not suppress the header output from --head
when --out-null was used to suppress output.

Assisted-by: Daniel Stenberg
Reported-by: Andrew Kvalheim

Ref: https://curl.se/docs/manpage.html#--out-null

Fixes https://github.com/curl/curl/discussions/20235
Closes https://github.com/curl/curl/pull/20256
2026-01-12 15:36:44 -05:00
Viktor Szakats
13f0ede730 build: add curl-lint/lint targets, CURL_LINT cmake option
To run checksrc and spacecheck on the source tree. Also for cmake
to sync up with autotools' `checksrc` target.

- cmake: `curl-lint`
  With `-DCURL_LINT=ON`, checks run automatically for all targets.
- autotools: `lint`

Closes #20175
2026-01-12 16:45:24 +01:00
Viktor Szakats
9dc2552ed1 GHA/checkdocs: drop duplicate spacecheck job
No longer necessary after making GHA/checksrc also run on `*.md` file
changes.

Reported-by: Daniel Stenberg
Bug: https://github.com/curl/curl/pull/20266#issuecomment-3738955165
Follow-up to 3800a26582 #18935
Follow-up to 9acecc923d #15423
Closes #20268
2026-01-12 16:31:23 +01:00
Patrick Monnerat
67d0bfc6c2 tool_filetime: sync dummy macro signature with function prototype
Closes #20265
2026-01-12 16:29:32 +01:00
Patrick Monnerat
c326506115 rtsp: match connection_check procedure with required signature
Follow-up to e3691612ea

Closes #20265
2026-01-12 16:29:32 +01:00
Viktor Szakats
41a6eeadf6 GHA/non-native: disable FreeBSD arm CI jobs (upstream breakage)
Package manager is not finding packages.

FreeBSD 15, moving to cmake, dropping impacket, stunnel, ldap, kerberos,
could not fix it.

Closes #20267
2026-01-12 16:26:49 +01:00
Daniel Stenberg
44312b4b11 mimepost: allocate main struct on-demand
This makes the easy handle 432 bytes smaller (totally 5352 bytes on my
rather maximized Linux 64 bit build). The 440 byte mimepost struct is
now allocated only when needed.

Closes #20260
2026-01-12 16:21:02 +01:00
Daniel Stenberg
9e0b02c19c urldata: change 'keep_post' into three distinct bitfields
Closes #20262
2026-01-12 16:20:14 +01:00
Daniel Stenberg
31fbbb322e altsvc: only accept 17 byte dates from files
Since the date format is fixed there is no need to accept more data.

Update test355 to verify reject of too long date in alt-svc file

This test case was originally supposed to verify alt-svc loading from a
file but never did because it was done incorrectly.

Now it verifies that a too long date in the input file makes curl
disregard the entry.

Closes #20259
2026-01-12 13:49:57 +01:00
Daniel Stenberg
40fee505a0 tool_operate: split single_transfer into sub functions
To make it more manageable and less complex

Closes #20258
2026-01-12 08:42:23 +01:00
Daniel Stenberg
bd3b2a626a libssh: simplify myssh_statemach_act()
Reduce complexity by splitting out sub functions.

Made myssh_quote_error() to reduce code duplication.

Closes #20252
2026-01-11 23:28:54 +01:00
Viktor Szakats
1b24428d62 GHA: delete disable-man-db hack, runners doing it by default now
Refs:
1f107542ae
https://github.com/actions/runner-images/pull/13268
https://github.com/actions/runner-images/issues/13213

Follow-up to 5acba8bc36 #17181

Closes #20254
2026-01-11 15:40:21 +01:00
Viktor Szakats
a6087d69a9 GHA: delete new apt sources adding the flaky distro source
CI workflows deleted apt package source `microsoft-prod.list` due to
flakiness seen in the past with those sources. Sources are still flaky
and they are now also used from `azure-cli.sources` which is included
by default by the runner images. Add it to the delete list.

Also: remove another new, unnecessary (for curl CI) package source seen
on the `ubuntu-24.04-arm` runner, for good measure, and performance.

Fixing:
```
Reading package lists...
E: Failed to fetch https://packages.microsoft.com/repos/azure-cli/dists/noble/InRelease  403  Forbidden [IP: 13.107.246.66 443]
E: The repository 'https://packages.microsoft.com/repos/azure-cli noble InRelease' is no longer signed.
Error: Process completed with exit code 100.
```
Ref: https://github.com/curl/curl/actions/runs/20896127602/job/60034941964?pr=20142#step:2:79

Follow-up to 303bb8785c #13473

Closes #20253
2026-01-11 15:25:19 +01:00
Daniel Stenberg
0596357584 wolfssl: fix build without USE_BIO_CHAIN
Reported-by: Megamouse on github
Fixes #20250
Closes #20251
2026-01-11 11:52:40 +01:00
Daniel Stenberg
2725d3cb85 altsvc: move logic from setopt into Curl_altsvc_ctrl()
To keep it all in one place.

Closes #20247
2026-01-11 10:44:43 +01:00
Viktor Szakats
219245a616 GHA: include runner CPU arch in cache keys (revert)
Turns out in practice the internal cache name contains the arch where it
matters (arm or dual-arch local builds), which is part of the cache key
string. Drop `runner.arch` to avoid two arch strings in the key.

Cache keys without an explicit arch designator mean intel.

Revert ff78af5752 #20234

Closes #20249
2026-01-11 01:42:21 +01:00
Viktor Szakats
d9fe60d457 GHA/linux: fix 'mbedtls' internal name confusion
`mbedtls-arm` and `mbedtls-prev` were matching `contains()` expressions
looking for `mbedtls`. It caused an unnecessary cache restore and an
redundant mbedtls build on bumps, and made the build flavors require
different local directory names to avoid this accidental collision.

Also drop `-threadsafe` from internal names. All local builds are.

Follow-up to 8806035344 #20240
Follow-up to 3a305831d1 #19077

Closes #20248
2026-01-11 01:01:13 +01:00
Viktor Szakats
5225e69ed9 GHA/linux: move 6 jobs with locally built dependencies to arm
All libresll jobs, wolfssl-all, and one mbedtls job.

As noted earlier, arm jobs run faster than intel ones, especially
valgrind steps that run almost twice as fast. Package install runs
slower, but this is offset by faster build and test steps, even in
non-valgrind jobs.

Follow-up to ff78af5752 #20234
Follow-up to 2b0d8dcc16 #20231

Closes #20246
2026-01-10 23:43:28 +01:00
Viktor Szakats
ff78af5752 GHA: include runner CPU arch in cache keys
To clarify the arch for cache entries, also to allow building/caching
multiple archs in parallel if necessary.

Closes #20234
2026-01-10 23:03:18 +01:00
Viktor Szakats
bfacfb2355 plan9: drop special build and orphaned references
Would need 64-bit support.

Ref: https://github.com/curl/curl/pull/20233#issuecomment-3732556015
Follow-up to 0159100f4f #20233

Closes #20243
2026-01-10 23:03:17 +01:00
Daniel Stenberg
7433a6eb3f urldata: restore bitfield to unsigned int
Bug: https://github.com/curl/curl/pull/20209#pullrequestreview-3647160739

Reported-by: Patrick Monnerat
Follow-up to e3691612ea
Closes #20244
2026-01-10 22:42:05 +01:00
Viktor Szakats
f4b16563ab cmake: drop unused LONG_LONG reference from Windows prefills
It's no longer used in curl.

Follow-up to 0159100f4f #20233

Closes #20241
2026-01-10 17:39:11 +01:00
Viktor Szakats
2465f7c61d tool: improve error/warning messages when output filename sanitization fails
On MS-DOS (OOM and bad filename) and Windows (OOM only).

Given the rarity of both platform and error, we make a compromise and
return an unrelated libcurl error (43) in case of a bad output filename
on MS-DOS.

After:
```
$ CURL_FN_SANITIZE_OOM=1 wine curl.exe https://curl.se/ --output out.txt
curl: (27) Out of memory

$ CURL_FN_SANITIZE_BAD=1 wine curl.exe https://curl.se/ --output out.txt
Warning: bad output filename
curl: (43) A libcurl function was given a bad argument

$ CURL_FN_SANITIZE_OOM=1 wine curl.exe https://curl.se/index.html --globoff -O
curl: (27) Out of memory

$ CURL_FN_SANITIZE_BAD=1 wine curl.exe https://curl.se/index.html --globoff -O
curl: bad output filename
curl: (43) A libcurl function was given a bad argument
```

Before:
```
$ CURL_FN_SANITIZE_OOM=1 wine curl.exe https://curl.se/ --output out.txt
Warning: bad output glob
curl: (27) Out of memory

$ CURL_FN_SANITIZE_BAD=1 wine curl.exe https://curl.se/ --output out.txt
Warning: bad output glob
curl: (3) URL using bad/illegal format or missing URL

$ CURL_FN_SANITIZE_OOM=1 wine curl.exe https://curl.se/index.html --globoff -O
curl: Failed to extract a filename from the URL to use for storage
curl: (27) Out of memory

$ CURL_FN_SANITIZE_BAD=1 wine curl.exe https://curl.se/index.html --globoff -O
curl: Failed to extract a filename from the URL to use for storage
curl: (3) URL using bad/illegal format or missing URL
```

Ref: #20116 (simpler reboot of)
Ref: #20113 #20121
Ref: 40c1748af5 #20198
Ref: eb7f5b71e5 #20143
Ref: 8c02407bef #20125
Fixes #20044
Closes #20199
2026-01-10 13:21:27 +01:00
Daniel Stenberg
3e1179a695 KNOWN_BUGS.md: absolute Unix domain filename for SOCKS on Windows
Closes #20236
Closes #19825
2026-01-10 13:05:46 +01:00
renovate[bot]
f1422960bf GHA: update awslabs/aws-lc to v1.66.2
Closes #20238
2026-01-10 12:50:39 +01:00
Daniel Stenberg
0159100f4f lib: use (u)int64_t instead of long long
Remove config-plan9.h because it does not support 64 bit, meaning it has
not been working for years.

Closes #20233
2026-01-10 12:40:54 +01:00
Viktor Szakats
8806035344 GHA/linux: fix 'libressl' internal name confusion
`libressl-filc` was matching `contains()` expressions looking for
`libressl`, causing build confusion and failure in specific cases.

Rename `libressl` to `libressl-c` to avoid this. Also rename the cache
id for consistency, though not necessary for the fix.

Bug: https://github.com/curl/curl/actions/runs/20860412340/job/59938315276
Follow-up to c262481873 #19407
Cherry-picked from #20234

Closes #20240
2026-01-10 12:36:20 +01:00
Joshua Vandaële
97f518e193 cmake: reference OpenSSL and ZLIB imported targets only when enabled
This otherwise broke building on a parent with a static library which is
available but disabled (e.g. CURL_ZLIB is set to OFF but ZLIB::ZLIB
exists)

Closes #20217
2026-01-09 22:03:28 +01:00
Viktor Szakats
2b0d8dcc16 GHA: switch 12 Linux jobs to arm64
More cost-effective and seems as fast or faster than Intel.

In particular, valgrind seems to be almost 2x fast. So fast the job pair
could fit under 10 minutes if merged again (but would be the longest in
GHA/Linux.)

Installing packages is slightly slower. The package repo is Ubuntu's
which is slower than the Azure mirror used on Intel (unless Azure is
broken, which happened a lot last year).

To add to more jobs, the locally built deps also need to be migrated.

Also:
- add workaround for failing sshd server on Linux arm runners, caused by
  world-writable `HOME` directory.

Closes #20231
2026-01-09 19:35:16 +01:00