]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
smtp: return value ignored
authorDaniel Stenberg <daniel@haxx.se>
Sun, 19 Oct 2025 09:28:15 +0000 (11:28 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 19 Oct 2025 11:17:31 +0000 (13:17 +0200)
Return value from Curl_client_write was overwritten by
smtp_perform_command making errors ignored.

Pointed out by ZeroPath

Closes #19136

lib/smtp.c

index 76ed4f280afdd2b762f3c812d92d343be98a316f..30f85357657e3b0e7f198566c357fd1b4eeded6f 100644 (file)
@@ -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;