1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

CURLOPT_INFILESIZE: accept -1

Regression since f121575

Reported-by: Petr Voytsik
Fixes #2047
This commit is contained in:
Daniel Stenberg 2017-11-03 14:40:05 +01:00
parent b51e0742b9
commit 921bf1de52

View File

@ -1713,7 +1713,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
* to-be-uploaded file.
*/
arg = va_arg(param, long);
if(arg < 0)
if(arg < -1)
return CURLE_BAD_FUNCTION_ARGUMENT;
data->set.filesize = arg;
break;
@ -1723,7 +1723,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
* to-be-uploaded file.
*/
bigsize = va_arg(param, curl_off_t);
if(bigsize < 0)
if(bigsize < -1)
return CURLE_BAD_FUNCTION_ARGUMENT;
data->set.filesize = bigsize;
break;