Skip to content

Commit

Permalink
urlapi: fix part of conditional expression is always true: qlen
Browse files Browse the repository at this point in the history
Closes #10408
  • Loading branch information
Pronyushkin Petr authored and bagder committed Feb 6, 2023
1 parent 690c43b commit 2b46ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/urlapi.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 2b46ce0

Please sign in to comment.