]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
awssiv4: avoid freeing the date pointer on error
authorDaniel Stenberg <daniel@haxx.se>
Fri, 1 Sep 2023 08:35:40 +0000 (10:35 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 1 Sep 2023 11:36:10 +0000 (13:36 +0200)
Since it was not allocated, don't free it even if it was wrong syntax

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=61908

Follow-up to b137634ba3adb

Closes #11782

lib/http_aws_sigv4.c

index 3abfb096a22101c2bc4dfc17862207b5793c3238..686d26837deeee7c867e9ca8d25aa5de7603f99c 100644 (file)
@@ -220,8 +220,10 @@ static CURLcode make_headers(struct Curl_easy *data,
     char *value;
 
     value = strchr(*date_header, ':');
-    if(!value)
+    if(!value) {
+      *date_header = NULL;
       goto fail;
+    }
     ++value;
     while(ISBLANK(*value))
       ++value;