[exim-cvs] Avoid potential crash in close of a verify callou…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Exim Git Commits Mailing List
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] Avoid potential crash in close of a verify callout
Gitweb: https://git.exim.org/exim.git/commitdiff/345f272404cb1c454b7602214c76fd0ebf04d66e
Commit:     345f272404cb1c454b7602214c76fd0ebf04d66e
Parent:     eb2163cbc29a00b2ca214e507e4a57f374c2e8ed
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Thu May 9 14:10:12 2019 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Thu May 9 14:10:12 2019 +0100


    Avoid potential crash in close of a verify callout
---
 src/src/verify.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)


diff --git a/src/src/verify.c b/src/src/verify.c
index 720f85d..184809f 100644
--- a/src/src/verify.c
+++ b/src/src/verify.c
@@ -1103,12 +1103,9 @@ no_conn:
       if (options & vopt_callout_recipsender)
         cancel_cutthrough_connection(TRUE, US"not usable for cutthrough");
       if (sx.send_quit)
-    {
-    (void) smtp_write_command(&sx, SCMD_FLUSH, "QUIT\r\n");
-
-    /* Wait a short time for response, and discard it */
-    smtp_read_response(&sx, sx.buffer, sizeof(sx.buffer), '2', 1);
-    }
+    if (smtp_write_command(&sx, SCMD_FLUSH, "QUIT\r\n") != -1)
+      /* Wait a short time for response, and discard it */
+      smtp_read_response(&sx, sx.buffer, sizeof(sx.buffer), '2', 1);


       if (sx.cctx.sock >= 0)
     {