From fffc16dd9c4ad063ecee2ac073266120b203e136 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 19 Oct 2025 11:28:15 +0200 Subject: [PATCH] smtp: return value ignored Return value from Curl_client_write was overwritten by smtp_perform_command making errors ignored. Pointed out by ZeroPath Closes #19136 --- lib/smtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/smtp.c b/lib/smtp.c index 76ed4f280a..30f8535765 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -1136,7 +1136,7 @@ static CURLcode smtp_state_command_resp(struct Curl_easy *data, if(!data->req.no_body) result = Curl_client_write(data, CLIENTWRITE_BODY, line, len); - if(smtpcode != 1) { + if(!result && (smtpcode != 1)) { if(smtp->rcpt) { smtp->rcpt = smtp->rcpt->next; -- 2.47.3