891f1041 | 21-Nov-2023 |
Daniel Stenberg |
transfer: avoid unreachable expression If curl_off_t and size_t have the same size (which is common on modern 64 bit systems), a condition cannot occur which Coverity pointed out. Av
transfer: avoid unreachable expression If curl_off_t and size_t have the same size (which is common on modern 64 bit systems), a condition cannot occur which Coverity pointed out. Avoid the warning by having the code conditionally only used if curl_off_t actually is larger. Follow-up to 1cd2f0072fa482e25baa2 Closes #12370
show more ...
|
1cd2f007 | 06-Nov-2023 |
Stefan Eissing |
transfer: readwrite improvements - changed header/chunk/handler->readwrite prototypes to accept `buf`, `blen` and a `pconsumed` pointer. They now get the buffer to work on and re
transfer: readwrite improvements - changed header/chunk/handler->readwrite prototypes to accept `buf`, `blen` and a `pconsumed` pointer. They now get the buffer to work on and report back how many bytes they consumed - eliminated `k->str` in SingleRequest - improved excess data handling to properly calculate with any body data left in the headerb buffer - eliminated `k->badheader` enum to only be a bool Closes #12283
show more ...
|
d9e7643c | 21-Nov-2023 |
Daniel Stenberg |
RELEASE-NOTES: synced |
6a095da1 | 20-Nov-2023 |
Jiří Hruška |
transfer: avoid calling the read callback again after EOF Regression since 7f43f3dc5994d01b12 (7.84.0) Bug: https://curl.se/mail/lib-2023-11/0017.html Closes #12363 |
db5bf231 | 20-Nov-2023 |
Daniel Stenberg |
doh: provide better return code for responses w/o addresses Previously it was wrongly returning CURLE_OUT_OF_MEMORY when the response did not contain any addresses. Now it more accuratel
doh: provide better return code for responses w/o addresses Previously it was wrongly returning CURLE_OUT_OF_MEMORY when the response did not contain any addresses. Now it more accurately returns CURLE_COULDNT_RESOLVE_HOST. Reported-by: lRoccoon on github Fixes #12365 Closes #12366
show more ...
|
b06b6216 | 20-Nov-2023 |
Stefan Eissing |
HTTP/2, HTTP/3: handle detach of onoing transfers - refs #12356 where a UAF is reported when closing a connection with a stream whose easy handle was cleaned up already - handle DE
HTTP/2, HTTP/3: handle detach of onoing transfers - refs #12356 where a UAF is reported when closing a connection with a stream whose easy handle was cleaned up already - handle DETACH events same as DONE events in h2/h3 filters Fixes #12356 Reported-by: Paweł Wegner Closes #12364
show more ...
|
413a0fed | 16-Nov-2023 |
Viktor Szakats |
autotools: stop setting `-std=gnu89` with `--enable-warnings` Do not alter the C standard when building with `--enable-warnings` when building with gcc. On one hand this alters
autotools: stop setting `-std=gnu89` with `--enable-warnings` Do not alter the C standard when building with `--enable-warnings` when building with gcc. On one hand this alters warning results compared to a default build. On the other, it may produce different binaries, which is unexpected. Also fix new warnings that appeared after removing `-std=gnu89`: - include: fix public curl headers to use the correct printf mask for `CURL_FORMAT_CURL_OFF_T` and `CURL_FORMAT_CURL_OFF_TU` with mingw-w64 and Visual Studio 2013 and newer. This fixes the printf mask warnings in examples and tests. E.g. [1] - conncache: fix printf format string [2]. - http2: fix potential null pointer dereference [3]. (seen on Slackware with gcc 11.) - libssh: fix printf format string in SFTP code [4]. Also make MSVC builds compatible with old CRT versions. - libssh2: fix printf format string in SFTP code for MSVC. Applying the same fix as for libssh above. - unit1395: fix `argument is null` and related issues [5]: - stop calling `strcmp()` with NULL to avoid undefined behaviour. - fix checking results if some of them were NULL. - do not pass NULL to printf `%s`. - ci: keep a build job with `-std=gnu89` to continue testing for C89-compliance. We can apply this to other gcc jobs as needed. Ref: b23ce2cee7329bbf425f18b49973b7a5f23dfcb4 (2022-09-23) #9542 [1] https://dev.azure.com/daniel0244/curl/_build/results?buildId=18581&view=logs&jobId=ccf9cc6d-2ef1-5cf2-2c09-30f0c14f923b [2] https://github.com/curl/curl/actions/runs/6896854263/job/18763831142?pr=12346#step:6:67 [3] https://github.com/curl/curl/actions/runs/6896854253/job/18763839238?pr=12346#step:30:214 [4] https://github.com/curl/curl/actions/runs/6896854253/job/18763838007?pr=12346#step:29:895 [5] https://github.com/curl/curl/actions/runs/6896854253/job/18763836775?pr=12346#step:33:1689 Closes #12346
show more ...
|
95231921 | 19-Nov-2023 |
Viktor Szakats |
autotools: fix/improve gcc and Apple clang version detection - Before this patch we expected `n.n` `-dumpversion` output, but Ubuntu may return `n-win32` (also with `-dumpfullversion`)
autotools: fix/improve gcc and Apple clang version detection - Before this patch we expected `n.n` `-dumpversion` output, but Ubuntu may return `n-win32` (also with `-dumpfullversion`). Causing these errors and failing to enable picky warnings: ``` ../configure: line 23845: test: : integer expression expected ``` Ref: https://github.com/libssh2/libssh2/actions/runs/6263453828/job/17007893718#step:5:143 Fix that by stripping any dash-suffix and handling a dotless (major-only) version number by assuming `.0` in that case. `9.3-posix`, `9.3-win32`, `6`, `9.3.0`, `11`, `11.2`, `11.2.0` Ref: https://github.com/mamedev/mame/pull/9767 - fix Apple clang version detection for releases between 'Apple LLVM version 7.3.0' and 'Apple LLVM version 10.0.1' where the version was under-detected as 3.7 llvm/clang equivalent. - fix Apple clang version detection for 'Apple clang version 11.0.0' and newer where the Apple clang version was detected, instead of its llvm/clang equivalent. - display detected clang/gcc/icc compiler version. Via libssh2: - https://github.com/libssh2/libssh2/commit/00a3b88c51cdb407fbbb347a2e38c5c7d89875ad https://github.com/libssh2/libssh2/pull/1187 - https://github.com/libssh2/libssh2/commit/89ccc83c7da73e7ca3a112e350008131942b592e https://github.com/libssh2/libssh2/pull/1232 Closes #12362
show more ...
|
3215a791 | 19-Nov-2023 |
Viktor Szakats |
autotools: delete LCC compiler support bits Follow-up to fd7ef00f4305a2919e6950def1cf83d0110a4acd #12222 Closes #12357 |
33493db2 | 17-Nov-2023 |
Viktor Szakats |
cmake: add test for `DISABLE` options, add `CURL_DISABLE_HEADERS_API` - tests: verify CMake `DISABLE` options. Make an exception for 2 CMake-only ones, and one more that's u
cmake: add test for `DISABLE` options, add `CURL_DISABLE_HEADERS_API` - tests: verify CMake `DISABLE` options. Make an exception for 2 CMake-only ones, and one more that's using a different naming scheme, also in autotools and source. - cmake: add support for `CURL_DISABLE_HEADERS_API`. Suggested-by: Daniel Stenberg Ref: https://github.com/curl/curl/pull/12345#pullrequestreview-1736238641 Closes #12353
show more ...
|
b9b50f31 | 24-Oct-2023 |
Jacob Hoffman-Andrews |
hyper: temporarily remove HTTP/2 support The current design of the Hyper integration requires rebuilding the Hyper clientconn for each request. However, building the clientconn requi
hyper: temporarily remove HTTP/2 support The current design of the Hyper integration requires rebuilding the Hyper clientconn for each request. However, building the clientconn requires resending the HTTP/2 connection preface, which is incorrect from a protocol perspective. That in turn causes servers to send GOAWAY frames, effectively degrading performance to "no connection reuse" in the best case. It may also be triggering some bugs where requests get dropped entirely and reconnects take too long. This doesn't rule out HTTP/2 support with Hyper, but it may take a redesign of the Hyper integration in order to make things work. Closes #12191
show more ...
|
9ac6023d | 19-Nov-2023 |
Jay Satiro |
schannel: fix unused variable warning Bug: https://github.com/curl/curl/pull/12349#issuecomment-1818000846 Reported-by: Viktor Szakats Closes https://github.com/curl/curl/pull/1
schannel: fix unused variable warning Bug: https://github.com/curl/curl/pull/12349#issuecomment-1818000846 Reported-by: Viktor Szakats Closes https://github.com/curl/curl/pull/12361
show more ...
|
b2d8f3f7 | 17-Nov-2023 |
Daniel Stenberg |
url: find scheme with a "perfect hash" Instead of a loop to scan over the potentially 30+ scheme names, this uses a "perfect hash" table. This works fine because the set of schemes i
url: find scheme with a "perfect hash" Instead of a loop to scan over the potentially 30+ scheme names, this uses a "perfect hash" table. This works fine because the set of schemes is known and cannot change in a build. The hash algorithm and table size is made to only make a single scheme index per table entry. The perfect hash is generated by a separate tool (scripts/schemetable.c) Closes #12347
show more ...
|
d6447b1b | 17-Nov-2023 |
Daniel Stenberg |
scripts: add schemetable.c This tool generates a scheme-matching table. It iterates over a number of different initial and shift values in order to find the hash algorithm that
scripts: add schemetable.c This tool generates a scheme-matching table. It iterates over a number of different initial and shift values in order to find the hash algorithm that needs the smallest possible table. The generated hash function, table and table size then needs to be used by the url.c:Curl_getn_scheme_handler() function.
show more ...
|
fa714830 | 17-Nov-2023 |
Stefan Eissing |
vtls/vquic, keep peer name information together - add `struct ssl_peer` to keep hostname, dispname and sni for a filter - allocate `sni` for use in VTLS backend - eliminate `Cu
vtls/vquic, keep peer name information together - add `struct ssl_peer` to keep hostname, dispname and sni for a filter - allocate `sni` for use in VTLS backend - eliminate `Curl_ssl_snihost()` and its use of the download buffer - use ssl_peer in SSL and QUIC filters Closes #12349
show more ...
|
a9fd0d00 | 17-Nov-2023 |
Viktor Szakats |
build: always revert `#pragma GCC diagnostic` after use Before this patch some source files were overriding gcc warning options, but without restoring them at the end of the file. In CMa
build: always revert `#pragma GCC diagnostic` after use Before this patch some source files were overriding gcc warning options, but without restoring them at the end of the file. In CMake UNITY builds these options spilled over to the remainder of the source code, effecitvely disabling them for a larger portion of the codebase than intended. `#pragma clang diagnostic` didn't have such issue in the codebase. Reviewed-by: Marcel Raad Closes #12352
show more ...
|
ab50027d | 15-Nov-2023 |
Viktor Szakats |
tidy-up: casing typos, delete unused Windows version aliases - cmake: fix casing of `UnixSockets` to match the rest of the codebase. - curl-compilers.m4: fix casing in a comment.
tidy-up: casing typos, delete unused Windows version aliases - cmake: fix casing of `UnixSockets` to match the rest of the codebase. - curl-compilers.m4: fix casing in a comment. - setup-win32: delete unused Windows version constant aliases. Reviewed-by: Marcel Raad Closes #12351
show more ...
|
7f33848c | 17-Nov-2023 |
Viktor Szakats |
keylog: disable if unused Fully disable keylog code if there is no TLS or QUIC subsystem using it. Closes #12350 |
20bb363f | 16-Nov-2023 |
Viktor Szakats |
cmake: add `CURL_DISABLE_BINDLOCAL` option To match similar autotools option. Default is `ON`. Reviewed-by: Daniel Stenberg Closes #12345 |
a5daac60 | 16-Nov-2023 |
Viktor Szakats |
url: fix `-Wzero-length-array` with no protocols Fixes: ``` ./lib/url.c:178:56: warning: use of an empty initializer is a C2x extension [-Wc2x-extensions] 178 | static const st
url: fix `-Wzero-length-array` with no protocols Fixes: ``` ./lib/url.c:178:56: warning: use of an empty initializer is a C2x extension [-Wc2x-extensions] 178 | static const struct Curl_handler * const protocols[] = { | ^ ./lib/url.c:178:56: warning: zero size arrays are an extension [-Wzero-length-array] ``` Closes #12344
show more ...
|
47c00fce | 16-Nov-2023 |
Viktor Szakats |
url: fix builds with `CURL_DISABLE_HTTP` Fixes: ``` ./lib/url.c:456:35: error: no member named 'formp' in 'struct UrlState' 456 | Curl_mime_cleanpart(data->state.formp);
url: fix builds with `CURL_DISABLE_HTTP` Fixes: ``` ./lib/url.c:456:35: error: no member named 'formp' in 'struct UrlState' 456 | Curl_mime_cleanpart(data->state.formp); | ~~~~~~~~~~~ ^ ``` Regression from 74b87a8af13a155c659227f5acfa78243a8b2aa6 #11682 Closes #12343
show more ...
|
4c1ef6d7 | 16-Nov-2023 |
Viktor Szakats |
http: fix `-Wunused-parameter` with no auth and no proxy ``` lib/http.c:734:26: warning: unused parameter 'proxy' [-Wunused-parameter] bool proxy)
http: fix `-Wunused-parameter` with no auth and no proxy ``` lib/http.c:734:26: warning: unused parameter 'proxy' [-Wunused-parameter] bool proxy) ^ ``` Reviewed-by: Marcel Raad Closes #12338
show more ...
|
f996d4aa | 16-Nov-2023 |
Daniel Stenberg |
TODO: Some TLS options are not offered for HTTPS proxies Closes #12286 Closes #12342 |
4998bbd8 | 16-Nov-2023 |
Daniel Stenberg |
RELEASE-NOTES: synced |
54a385e3 | 16-Nov-2023 |
Daniel Stenberg |
duphandle: make dupset() not return with pointers to old alloced data As the blob pointers are to be duplicated, the function must not return mid-function with lingering pointers to the
duphandle: make dupset() not return with pointers to old alloced data As the blob pointers are to be duplicated, the function must not return mid-function with lingering pointers to the old handle's allocated data, as that would lead to double-free in OOM situations. Make sure to clear all destination pointers first to avoid this risk. Closes #12337
show more ...
|