http_aws_sigv4: check the return value of curl_maprintf()

Closes #9328
This commit is contained in:
x2018 2025-11-02 13:28:34 +08:00 committed by Daniel Stenberg
parent 2ffa8307b5
commit c898da26c6
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -329,6 +329,8 @@ static CURLcode make_headers(struct Curl_easy *data,
goto fail;
head = tmp_head;
*date_header = curl_maprintf("%s: %s\r\n", date_hdr_key, timestamp);
if(!*date_header)
goto fail;
}
else {
const char *value;