aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-11-03 14:40:05 +0100
committerDaniel Stenberg <daniel@haxx.se>2017-11-03 14:40:19 +0100
commit921bf1de527f287788fb0cdc7c1980e901fcb698 (patch)
tree1408331a68eeaa60632a7549031690e078d57ca7
parentb51e0742b9349c6414956570c76a2152f5b22106 (diff)
CURLOPT_INFILESIZE: accept -1
Regression since f121575 Reported-by: Petr Voytsik Fixes #2047
-rw-r--r--lib/url.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index 2e801e58f..c3fb297d2 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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;