diff --git a/lib/setopt.c b/lib/setopt.c index 604c9cbc4c..5d5da804d4 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -107,7 +107,7 @@ CURLcode Curl_setblobopt(struct curl_blob **blobp, if(blob) { struct curl_blob *nblob; - if(blob->len > CURL_MAX_INPUT_LENGTH) + if(!blob->len || (blob->len > CURL_MAX_INPUT_LENGTH)) return CURLE_BAD_FUNCTION_ARGUMENT; nblob = (struct curl_blob *) curlx_malloc(sizeof(struct curl_blob) +