From: Daniel Stenberg Date: Tue, 28 Oct 2025 15:19:10 +0000 (+0100) Subject: fixup simplify the url parser more X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fbagder%2Fsmtp-strparse;p=thirdparty%2Fcurl.git fixup simplify the url parser more --- diff --git a/lib/smtp.c b/lib/smtp.c index d722ba8f10..8b199d2ea3 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -1754,6 +1754,7 @@ static CURLcode smtp_parse_url_options(struct connectdata *conn, while(!result && ptr && *ptr) { struct Curl_str key; + result = CURLE_URL_MALFORMAT; if(!curlx_str_until(&ptr, &key, 64, '=') && !curlx_str_single(&ptr, '=')) { struct Curl_str value; @@ -1765,13 +1766,9 @@ static CURLcode smtp_parse_url_options(struct connectdata *conn, result = Curl_sasl_parse_url_auth_option(&smtpc->sasl, curlx_str(&value), curlx_strlen(&value)); - else - result = CURLE_URL_MALFORMAT; if(!semi) break; } - else - result = CURLE_URL_MALFORMAT; } return result;