]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http_aws_sigv4: check the return value of curl_maprintf()
authorx2018 <xkernel.wang@foxmail.com>
Sun, 2 Nov 2025 05:28:34 +0000 (13:28 +0800)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 2 Nov 2025 22:04:24 +0000 (23:04 +0100)
Closes #9328

lib/http_aws_sigv4.c

index f592f3844feba99716c1afa6997e41c520a1435d..bb88a0f8ce7bf4f7452f7f234525cc9f3752f370 100644 (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;