From: Daniel Stenberg Date: Fri, 8 Sep 2023 16:13:14 +0000 (+0200) Subject: http_aws_sigv4: skip the op if the query pair is zero bytes X-Git-Tag: curl-8_3_0~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16bdc09ee01c8041cde3e7f1f11de17f5a6c27b0;p=thirdparty%2Fcurl.git http_aws_sigv4: skip the op if the query pair is zero bytes Follow-up to fc76a24c53b08cdf Spotted by OSS-Fuzz Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62175 Closes #11823 --- diff --git a/lib/http_aws_sigv4.c b/lib/http_aws_sigv4.c index f62820207b..050ce21c9e 100644 --- a/lib/http_aws_sigv4.c +++ b/lib/http_aws_sigv4.c @@ -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);