summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-10-15 23:51:41 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-10-15 23:51:41 +0200
commitec971e545fa1eaf80476e861b0c182ad051c4d3b (patch)
tree64899af84ee8d9dc977b5e42e7662e47687a9c25
parent253e5b801800e1cdfa63348b9ad1e25e1e546641 (diff)
downloadcurl-bagder/setopt-ms-integer-overflows.tar.gz
fixup correct the range checks for *_RESUME_FROM*bagder/setopt-ms-integer-overflows
-rw-r--r--lib/url.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index 40074ecda..76c09c72a 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1985,7 +1985,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
* Resume transfer at the given file position
*/
arg = va_arg(param, long);
- if(arg < 0)
+ if(arg < -1)
return CURLE_BAD_FUNCTION_ARGUMENT;
data->set.set_resume_from = arg;
break;
@@ -1994,7 +1994,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
* Resume transfer at the given file position
*/
bigsize = va_arg(param, curl_off_t);
- if(bigsize < 0)
+ if(bigsize < -1)
return CURLE_BAD_FUNCTION_ARGUMENT;
data->set.set_resume_from = bigsize;
break;