From: Pronyushkin Petr Date: Fri, 3 Feb 2023 06:35:15 +0000 (+0500) Subject: urlapi: fix part of conditional expression is always true: qlen X-Git-Tag: curl-7_88_0~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b46ce03138f266bb2922328e090305c4a7b68b8;p=thirdparty%2Fcurl.git urlapi: fix part of conditional expression is always true: qlen Closes #10408 --- 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 */