mirror of
https://github.com/curl/curl.git
synced 2026-08-25 01:03:31 +03:00
urldata: make 'use_port' an usigned short
... instead of a long. It is already enforced to not attempt to set any value outside of 16 bits unsigned. Closes #9099
This commit is contained in:
parent
ccc8092b05
commit
1d85d2e4f9
4 changed files with 8 additions and 7 deletions
|
|
@ -1434,12 +1434,12 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||
break;
|
||||
case CURLOPT_PORT:
|
||||
/*
|
||||
* The port number to use when getting the URL
|
||||
* The port number to use when getting the URL. 0 disables it.
|
||||
*/
|
||||
arg = va_arg(param, long);
|
||||
if((arg < 0) || (arg > 65535))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
data->set.use_port = arg;
|
||||
data->set.use_port = (unsigned short)arg;
|
||||
break;
|
||||
case CURLOPT_TIMEOUT:
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue