mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:33:44 +03:00
multi: make max_total_* members size_t
Check size_t conversion on setting these members via CURLMIPT_*. Use members without casting. Closes #19618
This commit is contained in:
parent
047b36d7a6
commit
e2be568974
7 changed files with 29 additions and 10 deletions
|
|
@ -3271,10 +3271,12 @@ CURLMcode curl_multi_setopt(CURLM *m,
|
|||
multi->maxconnects = (unsigned int)uarg;
|
||||
break;
|
||||
case CURLMOPT_MAX_HOST_CONNECTIONS:
|
||||
multi->max_host_connections = va_arg(param, long);
|
||||
if(!curlx_sltouz(va_arg(param, long), &multi->max_host_connections))
|
||||
res = CURLM_BAD_FUNCTION_ARGUMENT;
|
||||
break;
|
||||
case CURLMOPT_MAX_TOTAL_CONNECTIONS:
|
||||
multi->max_total_connections = va_arg(param, long);
|
||||
if(!curlx_sltouz(va_arg(param, long), &multi->max_total_connections))
|
||||
res = CURLM_BAD_FUNCTION_ARGUMENT;
|
||||
break;
|
||||
/* options formerly used for pipelining */
|
||||
case CURLMOPT_MAX_PIPELINE_LENGTH:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue