curl/lib
Daniel Stenberg 0805ec043e
altsvc: cap the list at 5,000 entries
Avoid never-ending growth.

When adding more entries, it now deletes the first entry in the list,
which is the oldest added entry still held in memory. I decided to avoid
a Least Recently Used concept as I suspect with a list with this many
entries most entries have not been used, and we don't save the timestamp
of recent use anyway.

The net effect might (no matter what) be that the removed entry might
feel a bit "random" in the eyes of the user.

Verify with test 1669.

Reported-by: Geeknik Labs
Fixes #21183
Closes #21189
2026-04-01 12:05:47 +02:00
..
curlx tool: fix memory mixups 2026-03-27 08:10:32 +01:00
vauth gcc: guard #pragma diagnostic in core code for <4.6, disable picky warnings 2026-03-18 11:33:37 +01:00
vquic cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
vssh libssh: propagate error back in SFTP function 2026-03-27 16:12:51 +01:00
vtls wolfssl: fix build without TLS 1.3 support 2026-03-30 18:50:02 +02:00
.gitignore
altsvc.c altsvc: cap the list at 5,000 entries 2026-04-01 12:05:47 +02:00
altsvc.h altsvc: cap the list at 5,000 entries 2026-04-01 12:05:47 +02:00
amigaos.c share: concurrency handling, easy updates 2026-03-21 14:42:49 +01:00
amigaos.h
arpa_telnet.h stop using the word 'just' 2026-03-03 15:30:22 +01:00
asyn-ares.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
asyn-base.c lib: drop support for < c-ares 1.16.0 2026-03-21 23:37:59 +01:00
asyn-thrdd.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
asyn.h cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
bufq.c
bufq.h badwords: rework exceptions, fix many of them 2026-03-12 01:01:16 +01:00
bufref.c
bufref.h
cf-dns.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
cf-dns.h cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
cf-h1-proxy.c proxy: chunked response, error code 2026-03-25 12:16:21 +01:00
cf-h1-proxy.h clang-tidy: sync argument names in prototype and definition 2026-02-19 12:44:37 +01:00
cf-h2-proxy.c proxy: chunked response, error code 2026-03-25 12:16:21 +01:00
cf-h2-proxy.h
cf-haproxy.c
cf-haproxy.h
cf-https-connect.c cf-https-connect: silence -Wimplicit-int-enum-cast with HTTPS-RR + clang 21 (reapply) 2026-03-31 03:32:36 +02:00
cf-https-connect.h cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
cf-ip-happy.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
cf-ip-happy.h cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
cf-socket.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
cf-socket.h cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
cfilters.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
cfilters.h cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
CMakeLists.txt cmake: use AIX built-in variable (with CMake 4.0+) 2026-03-30 13:05:17 +02:00
config-mac.h src: drop detecting and redefining system symbol ftruncate 2026-03-30 13:46:14 +02:00
config-os400.h build: drop redundant HAVE_PTHREAD_H guard 2026-03-30 18:57:07 +02:00
config-riscos.h src: drop detecting and redefining system symbol ftruncate 2026-03-30 13:46:14 +02:00
config-win32.h src: drop detecting and redefining system symbol ftruncate 2026-03-30 13:46:14 +02:00
conncache.c connection bits: move 'connect_only' here 2026-03-17 15:01:29 +01:00
conncache.h badwords: rework exceptions, fix many of them 2026-03-12 01:01:16 +01:00
connect.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
connect.h cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
content_encoding.c gcc: guard #pragma diagnostic in core code for <4.6, disable picky warnings 2026-03-18 11:33:37 +01:00
content_encoding.h
cookie.c cookie: fix rejection when tabs in value 2026-04-01 10:45:05 +02:00
cookie.h clang-tidy: sync argument names in prototype and definition 2026-02-19 12:44:37 +01:00
cshutdn.c connection bits: move 'connect_only' here 2026-03-17 15:01:29 +01:00
cshutdn.h badwords: rework exceptions, fix many of them 2026-03-12 01:01:16 +01:00
curl_addrinfo.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
curl_addrinfo.h cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
curl_config-cmake.h.in build: drop redundant HAVE_PTHREAD_H guard 2026-03-30 18:57:07 +02:00
curl_ctype.h curl_ctype.h: fix spelling in a couple of locally used macros 2026-03-17 14:34:48 +01:00
curl_endian.c
curl_endian.h
curl_fnmatch.c clang-tidy: drop redundant casts 2026-02-19 15:27:17 +01:00
curl_fnmatch.h
curl_fopen.c fopen: for temp files, inherit permissions only for owner 2026-03-30 18:39:12 +02:00
curl_fopen.h
curl_get_line.c curl_get_line: error out on read errors 2026-03-17 16:14:08 +01:00
curl_get_line.h
curl_gethostname.c
curl_gethostname.h
curl_gssapi.c gcc: guard #pragma diagnostic in core code for <4.6, disable picky warnings 2026-03-18 11:33:37 +01:00
curl_gssapi.h gss: exclude verbose error logic from non-verbose builds 2026-02-10 02:34:33 +01:00
curl_hmac.h lib: accept larger input to md5/hmac/sha256/sha512 functions 2026-03-31 17:19:56 +02:00
curl_ldap.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
curl_md4.h
curl_md5.h lib: accept larger input to md5/hmac/sha256/sha512 functions 2026-03-31 17:19:56 +02:00
curl_memrchr.c
curl_memrchr.h
curl_ntlm_core.c curl_ntlm_core: drop redundant PP condition 2026-03-25 18:56:40 +01:00
curl_ntlm_core.h
curl_printf.h tidy-up: miscellaneous 2026-02-25 14:44:56 +01:00
curl_range.c stop using the word 'just' 2026-03-03 15:30:22 +01:00
curl_range.h
curl_sasl.c urldata: import port types and conn destination format 2026-03-15 12:02:26 +01:00
curl_sasl.h tidy-up: miscellaneous 2026-02-25 14:44:56 +01:00
curl_setup.h build: drop redundant HAVE_PTHREAD_H guard 2026-03-30 18:57:07 +02:00
curl_sha256.h lib: accept larger input to md5/hmac/sha256/sha512 functions 2026-03-31 17:19:56 +02:00
curl_sha512_256.c lib: accept larger input to md5/hmac/sha256/sha512 functions 2026-03-31 17:19:56 +02:00
curl_sha512_256.h
curl_share.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
curl_share.h share: concurrency handling, easy updates 2026-03-21 14:42:49 +01:00
curl_sspi.c
curl_sspi.h windows: tidy up includes, macros, document dependencies 2026-02-11 16:15:11 +01:00
curl_threads.c lib: add thread pool and queue 2026-03-23 23:03:58 +01:00
curl_threads.h build: drop duplicate pthread.h includes 2026-03-30 13:46:14 +02:00
curl_trc.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
curl_trc.h lib: add thread pool and queue 2026-03-23 23:03:58 +01:00
cw-out.c progress: count amount of data "delivered" to application 2026-03-21 23:21:55 +01:00
cw-out.h
cw-pause.c tidy-up: miscellaneous 2026-02-12 14:52:16 +01:00
cw-pause.h
dict.c protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
dict.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
dllmain.c
dnscache.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
dnscache.h cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
doh.c dnscache: own source file, improvements 2026-03-21 12:04:36 +01:00
doh.h dnscache: own source file, improvements 2026-03-21 12:04:36 +01:00
dynhds.c lib: move all UNITTEST prototypes to C files (cont.) 2026-03-21 13:14:46 +01:00
dynhds.h lib: move all UNITTEST prototypes to C files (cont.) 2026-03-21 13:14:46 +01:00
easy.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
easy_lock.h build: drop redundant HAVE_PTHREAD_H guard 2026-03-30 18:57:07 +02:00
easygetopt.c
easyif.h
easyoptions.c
easyoptions.h
escape.c clang-tidy: enable readability-math-missing-parentheses, adjust code 2026-02-23 18:57:40 +01:00
escape.h tidy-up: miscellaneous 2026-02-25 14:44:56 +01:00
fake_addrinfo.c tidy-up: miscellaneous 2026-02-25 14:44:56 +01:00
fake_addrinfo.h
file.c file: init fd to -1 to prevent close fd 0 on early failure 2026-03-20 15:00:21 +01:00
file.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
fileinfo.c
fileinfo.h
formdata.c stop using the word 'just' 2026-03-03 15:30:22 +01:00
formdata.h clang-tidy: add arg names to prototypes where missing 2026-02-23 01:00:47 +01:00
ftp-int.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
ftp.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
ftp.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
ftplistparser.c protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
ftplistparser.h clang-tidy: sync argument names in prototype and definition 2026-02-19 12:44:37 +01:00
functypes.h clang-tidy: check misc-header-include-cycle, fix in internal headers 2026-02-20 17:33:02 +01:00
getenv.c
getinfo.c progress: count amount of data "delivered" to application 2026-03-21 23:21:55 +01:00
getinfo.h
gopher.c protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
gopher.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
hash.c clang-tidy: check bugprone-macro-parentheses, fix fallouts 2026-02-22 00:58:04 +01:00
hash.h clang-tidy: add arg names to prototypes where missing 2026-02-23 01:00:47 +01:00
headers.c
headers.h badwords: rework exceptions, fix many of them 2026-03-12 01:01:16 +01:00
hmac.c lib: accept larger input to md5/hmac/sha256/sha512 functions 2026-03-31 17:19:56 +02:00
hostip.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
hostip.h cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
hostip4.c async-thrdd: use thread queue for resolving 2026-03-25 12:14:21 +01:00
hostip6.c async-thrdd: use thread queue for resolving 2026-03-25 12:14:21 +01:00
hsts.c hsts: skip expired HSTS entries read from file 2026-04-01 10:49:26 +02:00
hsts.h clang-tidy: sync argument names in prototype and definition 2026-02-19 12:44:37 +01:00
http.c http: refactor http_on_response into sub functions 2026-03-31 23:53:45 +02:00
http.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
http1.c http1: fix potential NULL dereference in Curl_h1_req_parse_read() 2026-03-02 13:45:14 +01:00
http1.h tidy-up: miscellaneous 2026-02-12 14:52:16 +01:00
http2.c http2: return error on OOM in push headers 2026-03-31 08:59:07 +02:00
http2.h http: refactor http_on_response into sub functions 2026-03-31 23:53:45 +02:00
http_aws_sigv4.c lib: move all UNITTEST prototypes to C files 2026-03-20 07:47:57 +01:00
http_aws_sigv4.h lib: move all UNITTEST prototypes to C files 2026-03-20 07:47:57 +01:00
http_chunks.c tidy-up: miscellaneous 2026-02-12 14:52:16 +01:00
http_chunks.h
http_digest.c badwords: rework exceptions, fix many of them 2026-03-12 01:01:16 +01:00
http_digest.h
http_negotiate.c
http_negotiate.h
http_ntlm.c
http_ntlm.h
http_proxy.c urldata: import port types and conn destination format 2026-03-15 12:02:26 +01:00
http_proxy.h urldata: import port types and conn destination format 2026-03-15 12:02:26 +01:00
httpsrr.c
httpsrr.h
idn.c clang-tidy: check bugprone-macro-parentheses, fix fallouts 2026-02-22 00:58:04 +01:00
idn.h clang-tidy: sync argument names in prototype and definition 2026-02-19 12:44:37 +01:00
if2ip.c gcc: guard #pragma diagnostic in core code for <4.6, disable picky warnings 2026-03-18 11:33:37 +01:00
if2ip.h
imap.c imap: reset the UIDVALIDITY state between transfers 2026-03-17 16:31:53 +01:00
imap.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
ldap.c gcc: guard #pragma diagnostic in core code for <4.6, disable picky warnings 2026-03-18 11:33:37 +01:00
libcurl.def
libcurl.rc
libcurl.vers.in
llist.c lib: move all UNITTEST prototypes to C files (cont.) 2026-03-21 13:14:46 +01:00
llist.h lib: move all UNITTEST prototypes to C files (cont.) 2026-03-21 13:14:46 +01:00
macos.c
macos.h
Makefile.am spacecheck: check long lines and repeat spaces, fix fallouts 2026-03-25 11:02:08 +01:00
Makefile.inc cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
Makefile.soname badwords: rework exceptions, fix many of them 2026-03-12 01:01:16 +01:00
md4.c md4, md5: switch to wolfCrypt API in wolfSSL builds 2026-03-25 18:56:40 +01:00
md5.c md5: fix large size handling 2026-03-31 17:53:03 +02:00
memdebug.c lib: add thread pool and queue 2026-03-23 23:03:58 +01:00
mime.c stop using the word 'just' 2026-03-03 15:30:22 +01:00
mime.h tidy-up: macro parentheses 2026-02-24 16:30:05 +01:00
mprintf.c build: assume snprintf() in mprintf, drop feature check 2026-03-21 13:30:37 +01:00
mqtt.c protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
mqtt.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
multi.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
multi_ev.c multi: improve wakeup and wait code 2026-03-21 11:58:24 +01:00
multi_ev.h
multi_ntfy.c
multi_ntfy.h
multihandle.h cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
multiif.h clang-tidy: add arg names to prototypes where missing 2026-02-23 01:00:47 +01:00
netrc.c netrc: skip malformed macdef lines 2026-03-21 23:20:49 +01:00
netrc.h netrc: remove unused parsenetrc() macro for netrc-disabled 2026-03-23 10:19:08 +01:00
noproxy.c lib: move all UNITTEST prototypes to C files 2026-03-20 07:47:57 +01:00
noproxy.h lib: move all UNITTEST prototypes to C files 2026-03-20 07:47:57 +01:00
openldap.c cmake: add CURL_GCC_ANALYZER option, enable in CI, fix/silence 2026-03-16 11:49:34 +01:00
optiontable.pl optiontable: replace stdin with filename arg, harden open() call 2026-03-19 15:06:43 +01:00
parsedate.c tidy-up: miscellaneous 2026-03-09 11:35:19 +01:00
parsedate.h clang-tidy: sync argument names in prototype and definition 2026-02-19 12:44:37 +01:00
pingpong.c pingpong: cleanup timeleft handling 2026-03-11 23:30:05 +01:00
pingpong.h pingpong: cleanup timeleft handling 2026-03-11 23:30:05 +01:00
pop3.c protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
pop3.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
progress.c progress: count amount of data "delivered" to application 2026-03-21 23:21:55 +01:00
progress.h progress: count amount of data "delivered" to application 2026-03-21 23:21:55 +01:00
protocol.c lib: make SMB support opt-in 2026-03-22 11:55:39 +01:00
protocol.h rtmp: drop support 2026-03-21 14:56:06 +01:00
psl.c
psl.h
rand.c rand: use BCryptGenRandom() in UWP builds 2026-03-18 14:47:39 +01:00
rand.h tidy-up: macro parentheses 2026-02-24 16:30:05 +01:00
ratelimit.c ratelimit: reset on start 2026-03-24 16:25:53 +01:00
ratelimit.h ratelimit: reset on start 2026-03-24 16:25:53 +01:00
request.c request: reset resp_trailer in new requests 2026-03-27 09:51:34 +01:00
request.h lib: keepon improving 2026-03-15 12:48:03 +01:00
rtsp.c protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
rtsp.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
select.c badwords: rework exceptions, fix many of them 2026-03-12 01:01:16 +01:00
select.h tidy-up: miscellaneous 2026-02-25 14:44:56 +01:00
sendf.c cmake: add CURL_GCC_ANALYZER option, enable in CI, fix/silence 2026-03-16 11:49:34 +01:00
sendf.h tidy-up: miscellaneous 2026-02-25 14:44:56 +01:00
setopt.c share: concurrency handling, easy updates 2026-03-21 14:42:49 +01:00
setopt.h clang-tidy: sync argument names in prototype and definition 2026-02-19 12:44:37 +01:00
setup-os400.h tidy-up: macro parentheses 2026-02-24 16:30:05 +01:00
setup-vms.h stop using the word 'just' 2026-03-03 15:30:22 +01:00
setup-win32.h stop using the word 'just' 2026-03-03 15:30:22 +01:00
sha256.c lib: accept larger input to md5/hmac/sha256/sha512 functions 2026-03-31 17:19:56 +02:00
sigpipe.h clang-tidy: check bugprone-macro-parentheses, fix fallouts 2026-02-22 00:58:04 +01:00
slist.c badwords: avoid 'simply' 2026-03-10 19:34:06 +01:00
slist.h
smb.c lib: make SMB support opt-in 2026-03-22 11:55:39 +01:00
smb.h lib: make SMB support opt-in 2026-03-22 11:55:39 +01:00
smtp.c protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
smtp.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
sockaddr.h
socketpair.c socketpair: clear 'err' when retrying due to EINTR 2026-03-06 22:50:29 +01:00
socketpair.h
socks.c socks: add assertion for hostname length in SOCKS5 connect 2026-03-30 16:13:24 +02:00
socks.h
socks_gssapi.c socks: reject zero-length GSSAPI/SSPI tokens from proxy 2026-03-30 16:07:06 +02:00
socks_sspi.c socks: reject zero-length GSSAPI/SSPI tokens from proxy 2026-03-30 16:07:06 +02:00
splay.c stop using the word 'just' 2026-03-03 15:30:22 +01:00
splay.h clang-tidy: sync argument names in prototype and definition 2026-02-19 12:44:37 +01:00
strcase.c
strcase.h clang-tidy: sync argument names in prototype and definition 2026-02-19 12:44:37 +01:00
strequal.c stop using the word 'just' 2026-03-03 15:30:22 +01:00
strerror.c
strerror.h
system_win32.c windows: determine RtlVerifyVersionInfo address on global init 2026-03-09 11:35:19 +01:00
system_win32.h
telnet.c protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
telnet.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
tftp.c protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
tftp.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00
thrdpool.c build: drop duplicate pthread.h includes 2026-03-30 13:46:14 +02:00
thrdpool.h async-thrdd: use thread queue for resolving 2026-03-25 12:14:21 +01:00
thrdqueue.c build: drop duplicate pthread.h includes 2026-03-30 13:46:14 +02:00
thrdqueue.h async-thrdd: use thread queue for resolving 2026-03-25 12:14:21 +01:00
transfer.c transfer: clear the URL pointer in OOM to avoid UAF 2026-03-27 15:56:12 +01:00
transfer.h transfer: enhance secure check 2026-03-17 15:56:02 +01:00
uint-bset.c lib: move all UNITTEST prototypes to C files 2026-03-20 07:47:57 +01:00
uint-bset.h lib: move all UNITTEST prototypes to C files 2026-03-20 07:47:57 +01:00
uint-hash.c lib: move all UNITTEST prototypes to C files 2026-03-20 07:47:57 +01:00
uint-hash.h lib: move all UNITTEST prototypes to C files 2026-03-20 07:47:57 +01:00
uint-spbset.c
uint-spbset.h
uint-table.c
uint-table.h clang-tidy: sync argument names in prototype and definition 2026-02-19 12:44:37 +01:00
url.c cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
url.h cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
urlapi-int.h lib: move all UNITTEST prototypes to C files 2026-03-20 07:47:57 +01:00
urlapi.c urlapi: fix handling of "file:///" 2026-03-23 10:17:59 +01:00
urldata.h cf-dns: connection filter for DNS queries 2026-03-30 13:28:38 +02:00
version.c lib: make SMB support opt-in 2026-03-22 11:55:39 +01:00
ws.c cmake: add CURL_GCC_ANALYZER option, enable in CI, fix/silence 2026-03-16 11:49:34 +01:00
ws.h protocol source, all about protocols and uri schemes 2026-03-16 08:39:02 +01:00