]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http_aws_sigv4: skip the op if the query pair is zero bytes
authorDaniel Stenberg <daniel@haxx.se>
Fri, 8 Sep 2023 16:13:14 +0000 (18:13 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 8 Sep 2023 20:15:20 +0000 (22:15 +0200)
Follow-up to fc76a24c53b08cdf

Spotted by OSS-Fuzz

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62175
Closes #11823

lib/http_aws_sigv4.c

index f62820207b71e6ab9096d72c79c3d904fd39e54b..050ce21c9e591c27955c79ed9f4d0365723fde78 100644 (file)
@@ -422,6 +422,8 @@ static CURLcode canon_query(struct Curl_easy *data,
   for(i = 0; !result && (i < entry); i++, ap++) {
     size_t len;
     const char *q = ap->p;
+    if(!ap->len)
+      continue;
     for(len = ap->len; len && !result; q++, len--) {
       if(ISALNUM(*q))
         result = Curl_dyn_addn(dq, q, 1);