summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNigel Metheringham <nigel@exim.org>2008-12-12 14:44:25 +0000
committerNigel Metheringham <nigel@exim.org>2008-12-12 14:44:25 +0000
commitcf73943b330a44b8716aa1fcbf649ee1f0fbc67b (patch)
treed03b6716a908d9da4a91ef3311fe61a78500489a
parent24c929a27415c7cfc7126c47e4cad39acf3efa6b (diff)
downloadexim4-cf73943b330a44b8716aa1fcbf649ee1f0fbc67b.tar.gz
Accept len modification fix. fixes: bug #770
-rw-r--r--doc/doc-txt/ChangeLog5
-rw-r--r--src/src/daemon.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 09b9031cc..1e4774067 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.557 2008/12/12 14:36:37 nm4 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.558 2008/12/12 14:44:25 nm4 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -80,6 +80,9 @@ NM/08 Fixed erroneous documentation references to smtp_notquit_acl to be
NM/09 Bugzilla 787: Potential buffer overflow in string_format
Patch provided by Eugene Bujak
+NM/10 Bugzilla 770: Problem on some platforms modifying the len parameter to accept()
+ Patch provided by Maxim Dounin
+
Exim version 4.69
-----------------
diff --git a/src/src/daemon.c b/src/src/daemon.c
index 2413eaea5..777cda6f4 100644
--- a/src/src/daemon.c
+++ b/src/src/daemon.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/daemon.c,v 1.25 2008/01/28 18:24:07 fanf2 Exp $ */
+/* $Cambridge: exim/src/src/daemon.c,v 1.26 2008/12/12 14:44:25 nm4 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -1613,7 +1613,7 @@ for (;;)
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 @@ for (;;)
{
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);