From 2b46ce03138f266bb2922328e090305c4a7b68b8 Mon Sep 17 00:00:00 2001 From: Pronyushkin Petr Date: Fri, 3 Feb 2023 11:35:15 +0500 Subject: [PATCH] urlapi: fix part of conditional expression is always true: qlen Closes #10408 --- lib/urlapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/urlapi.c b/lib/urlapi.c index 480ebc9a8f..4387e945df 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -1157,7 +1157,7 @@ static CURLUcode parseurl(const char *url, CURLU *u, unsigned int flags) size_t qlen = strlen(query) - fraglen; /* includes '?' */ pathlen = strlen(path) - qlen - fraglen; if(qlen > 1) { - if(qlen && (flags & CURLU_URLENCODE)) { + if(flags & CURLU_URLENCODE) { struct dynbuf enc; Curl_dyn_init(&enc, CURL_MAX_INPUT_LENGTH); /* skip the leading question mark */