[exim-dev] [Bug 770] Daemon should reinitialize len before c…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Maxim Dounin
Ημερομηνία:  
Προς: exim-dev
Αντικείμενο: [exim-dev] [Bug 770] Daemon should reinitialize len before calling accept()
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=770

Maxim Dounin <mdounin@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mdounin@???





--- Comment #1 from Maxim Dounin <mdounin@???> 2008-11-18 12:31:38 ---
Anybody? Inlining the patch to make review easier:

--- src/daemon.c.orig   Sat Aug 30 03:49:46 2008
+++ src/daemon.c        Mon Sep  1 00:46:09 2008
@@ -1613,7 +1613,7 @@
   struct sockaddr_in accepted;
   #endif


- EXIM_SOCKLEN_T len = sizeof(accepted);
+ EXIM_SOCKLEN_T len;
pid_t pid;

   /* This code is placed first in the loop, so that it gets obeyed at the
@@ -1808,6 +1808,7 @@
           {
           if (FD_ISSET(listen_sockets[sk], &select_listen))
             {
+            len = sizeof(accepted);
             accept_socket = accept(listen_sockets[sk],
               (struct sockaddr *)&accepted, &len);
             FD_CLR(listen_sockets[sk], &select_listen);



--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email