diff options
-rw-r--r-- | lib/url.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1143,7 +1143,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, * figure it out. Enables binary posts. */ bigsize = va_arg(param, long); - if(bigsize < 0) + if(bigsize < -1) return CURLE_BAD_FUNCTION_ARGUMENT; if(data->set.postfieldsize < bigsize && @@ -1162,6 +1162,8 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, * figure it out. Enables binary posts. */ bigsize = va_arg(param, curl_off_t); + if(bigsize < -1) + return CURLE_BAD_FUNCTION_ARGUMENT; if(data->set.postfieldsize < bigsize && data->set.postfields == data->set.str[STRING_COPYPOSTFIELDS]) { |