mirror of
https://github.com/curl/curl.git
synced 2026-05-17 01:06:35 +03:00
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
This commit is contained in:
parent
9b52d516bb
commit
6789eb0ff9
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue