From 6789eb0ff9f8a771417000b3fe985dd0c7409fd6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 26 Feb 2026 16:58:15 +0100 Subject: [PATCH] multi: avoid a theoretical 32-bit wrap If Curl_uint32_tbl_count() at some future point actually can return UINT_MAX, this fixes the math to not wrap. Closes #20742 --- lib/multi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/multi.c b/lib/multi.c index cdfe925cb8..5642978842 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -3725,7 +3725,7 @@ CURL **curl_multi_get_handles(CURLM *m) { struct Curl_multi *multi = m; void *entry; - unsigned int count = Curl_uint32_tbl_count(&multi->xfers); + size_t count = Curl_uint32_tbl_count(&multi->xfers); CURL **a = curlx_malloc(sizeof(struct Curl_easy *) * (count + 1)); if(a) { unsigned int i = 0;