[exim-dev] Small src/spam.c bugfix

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Michael Haardt
Date:  
À: exim-dev
Sujet: [exim-dev] Small src/spam.c bugfix
Hello,

a dying scanner may cause an endless loop. Here is a fix.

Michael
----------------------------------------------------------------------
--- src/spam.c.orig    2005-06-07 17:22:50.000000000 +0200
+++ src/spam.c    2005-06-08 10:20:09.000000000 +0200
@@ -247,6 +223,14 @@
       }
 #endif
       wrote = send(spamd_sock,spamd_buffer + offset,read - offset,0);
+      if (wrote == -1)
+      {
+          log_write(0, LOG_MAIN|LOG_PANIC,
+            "spam acl condition: %s on spamd socket", strerror(errno));
+        close(spamd_sock);
+        fclose(mbox_file);
+        return DEFER;
+      }
       if (offset + wrote != read) {
         offset += wrote;
         goto again;