urldata: make maxconnects a 32 bit value

"2^32 idle connections ought to be enough for anybody"

Closes #12375
This commit is contained in:
Daniel Stenberg 2023-11-21 18:18:27 +01:00
parent 14612e5fbe
commit 2d06eebf28
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 20 additions and 25 deletions

View file

@ -262,10 +262,10 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
* Set the absolute number of maximum simultaneous alive connection that
* libcurl is allowed to have.
*/
arg = va_arg(param, long);
if(arg < 0)
uarg = va_arg(param, unsigned long);
if(uarg > UINT_MAX)
return CURLE_BAD_FUNCTION_ARGUMENT;
data->set.maxconnects = arg;
data->set.maxconnects = (unsigned int)uarg;
break;
case CURLOPT_FORBID_REUSE:
/*