mirror of
https://github.com/curl/curl.git
synced 2026-07-09 00:17:15 +03:00
setopt: return error if received curl_blob->data is NULL
To avoid dereferencing in the function if `CURL_BLOB_COPY` is set, or outside of the function if unset. Reported-by: netspacer.research Closes #22129
This commit is contained in:
parent
b3675fe80a
commit
f7d4e11f4b
1 changed files with 1 additions and 1 deletions
|
|
@ -108,7 +108,7 @@ CURLcode Curl_setblobopt(struct curl_blob **blobp,
|
|||
|
||||
if(blob) {
|
||||
struct curl_blob *nblob;
|
||||
if(!blob->len || (blob->len > CURL_MAX_INPUT_LENGTH))
|
||||
if(!blob->data || !blob->len || (blob->len > CURL_MAX_INPUT_LENGTH))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
nblob = (struct curl_blob *)
|
||||
curlx_malloc(sizeof(struct curl_blob) +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue