diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2006-11-14 09:52:05 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2006-11-14 09:52:05 +0000 |
commit | d6b35d62bab9d80f1763a5fa08665d996f9bf787 (patch) | |
tree | b559a404e4e62736a30ea9df3fca24213155198a /sink.c | |
parent | 0fdf82b39a58ce62e79e2ef6090fbffae209eb5d (diff) | |
download | fetchmail-d6b35d62bab9d80f1763a5fa08665d996f9bf787.tar.gz fetchmail-d6b35d62bab9d80f1763a5fa08665d996f9bf787.tar.bz2 fetchmail-d6b35d62bab9d80f1763a5fa08665d996f9bf787.zip |
Fix regression from 6.3.4 that crashes fetchmail --mda FOO when encountering
malformed message. Report by Neil Hoggart (also closes BerliOS bugs #9364,
#9412, #9449).
svn path=/branches/BRANCH_6-3/; revision=4940
Diffstat (limited to 'sink.c')
-rw-r--r-- | sink.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1317,14 +1317,14 @@ int close_sink(struct query *ctl, struct msgblk *msg, flag forward) { int rc,e,e2,err = 0; - if (ferror(sinkfp)) - err = 1, e2 = errno; - if ((fflush(sinkfp))) - err = 1, e2 = errno; - /* close the delivery pipe, we'll reopen before next message */ if (sinkfp) { + if (ferror(sinkfp)) + err = 1, e2 = errno; + if ((fflush(sinkfp))) + err = 1, e2 = errno; + errno = 0; rc = pclose(sinkfp); e = errno; |