aboutsummaryrefslogtreecommitdiffstats
path: root/transact.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2003-10-10 20:55:21 +0000
committerEric S. Raymond <esr@thyrsus.com>2003-10-10 20:55:21 +0000
commitc3a31dcb427164135c922ef29404c31d7e876904 (patch)
tree634a71a8d49ca86759abf781c51cf7f458682bf2 /transact.c
parentd76c2a989ada984ace971fe86f9fc628b4e6358d (diff)
downloadfetchmail-c3a31dcb427164135c922ef29404c31d7e876904.tar.gz
fetchmail-c3a31dcb427164135c922ef29404c31d7e876904.tar.bz2
fetchmail-c3a31dcb427164135c922ef29404c31d7e876904.zip
Bulletproof the dup killer.
svn path=/trunk/; revision=3856
Diffstat (limited to 'transact.c')
-rw-r--r--transact.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/transact.c b/transact.c
index 843dd7ee..2bb28ede 100644
--- a/transact.c
+++ b/transact.c
@@ -899,10 +899,7 @@ int readheaders(int sock,
* get N copies. This is bad when N > 1.
*
* Foil this by suppressing all but one copy of a message with a
- * given set of headers. The accept_count test ensures
- * that multiple pieces of email with the same Message-ID, each
- * with a *single* addressee (the N == 1 case), won't be
- * suppressed.
+ * given set of headers.
*
* Note: This implementation only catches runs of successive
* messages with the same ID, but that should be good
@@ -930,11 +927,10 @@ int readheaders(int sock,
* If so there is a one in 18-quadrillion chance this
* code will incorrectly nuke the first message.
*/
- if (memcmp(ctl->lastdigest, ctl->digest, DIGESTLEN))
- memcpy(ctl->lastdigest, ctl->digest, DIGESTLEN);
- else if (accept_count > 1)
+ if (!memcmp(ctl->lastdigest, ctl->digest, DIGESTLEN))
return(PS_REFUSED);
}
+ memcpy(ctl->lastdigest, ctl->digest, DIGESTLEN);
}
/*