mirror of
https://github.com/moparisthebest/curl
synced 2024-11-16 06:25:03 -05:00
url: fix CURLOPT_DNS_CACHE_TIMEOUT arg value check to allow -1
Prior to this change since f121575
(7.56.1+) CURLOPT_DNS_CACHE_TIMEOUT
erroneously rejected -1 with CURLE_BAD_FUNCTION_ARGUMENT.
This commit is contained in:
parent
544bfdebea
commit
b51e0742b9
@ -722,7 +722,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
|
|||||||
switch(option) {
|
switch(option) {
|
||||||
case CURLOPT_DNS_CACHE_TIMEOUT:
|
case CURLOPT_DNS_CACHE_TIMEOUT:
|
||||||
arg = va_arg(param, long);
|
arg = va_arg(param, long);
|
||||||
if(arg < 0)
|
if(arg < -1)
|
||||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||||
data->set.dns_cache_timeout = arg;
|
data->set.dns_cache_timeout = arg;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user