.. also add same arg value check to CURLOPT_POSTFIELDSIZE_LARGE.
Prior to this change since
f121575 (7.56.1+) CURLOPT_POSTFIELDSIZE
erroneously rejected -1 value with CURLE_BAD_FUNCTION_ARGUMENT.
Bug: https://curl.haxx.se/mail/lib-2017-11/0000.html
Reported-by: Andrew Lambert
* 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 &&
* 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]) {