1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -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:
Jay Satiro 2017-11-02 00:30:28 -04:00
parent 544bfdebea
commit b51e0742b9

View File

@ -722,7 +722,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
switch(option) {
case CURLOPT_DNS_CACHE_TIMEOUT:
arg = va_arg(param, long);
if(arg < 0)
if(arg < -1)
return CURLE_BAD_FUNCTION_ARGUMENT;
data->set.dns_cache_timeout = arg;
break;