aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1999-06-15 02:47:11 +0000
committerEric S. Raymond <esr@thyrsus.com>1999-06-15 02:47:11 +0000
commitf422fc04a9043842658d43e7baf58e60052b225c (patch)
tree40719f36c20cc38aaf5beb070ffbbd447f849b29
parente7ba5c697aa6613ab1fd446be7caf0176415e76b (diff)
downloadfetchmail-f422fc04a9043842658d43e7baf58e60052b225c.tar.gz
fetchmail-f422fc04a9043842658d43e7baf58e60052b225c.tar.bz2
fetchmail-f422fc04a9043842658d43e7baf58e60052b225c.zip
Attempt to fix a mimedecode bug.
svn path=/trunk/; revision=2503
-rw-r--r--NEWS4
-rw-r--r--driver.c14
2 files changed, 10 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index 4ae0f3e3..33602ff3 100644
--- a/NEWS
+++ b/NEWS
@@ -8,9 +8,11 @@
Release Notes:
-fetchmail-5.1.0 ():
+fetchmail-5.0.5 ():
* Merged in official OpenBSD port patches.
* Added Spanish and German descriptions to spec (thanks to Horst von Brand).
+* Moved MIME decoding earlier to avoid messing with header length after
+ offsets have been calculated.
There are 261 people on fetchmail-friends and 408 on fetchmail-announce.
diff --git a/driver.c b/driver.c
index e5a32231..2be446c4 100644
--- a/driver.c
+++ b/driver.c
@@ -459,6 +459,13 @@ static int readheaders(int sock,
}
}
+ /*
+ * Decode MIME encoded headers. We MUST do this before
+ * looking at the Content-Type / Content-Transfer-Encoding
+ * headers (RFC 2046).
+ */
+ if (ctl->mimedecode)
+ UnMimeHeader(buf);
line = (char *) realloc(line, strlen(line) + strlen(buf) +1);
@@ -764,13 +771,6 @@ static int readheaders(int sock,
* In fact we have to, as this will tell us where to forward to.
*/
- /* Decode MIME encoded headers. We MUST do this before
- * looking at the Content-Type / Content-Transfer-Encoding
- * headers (RFC 2046).
- */
- if (ctl->mimedecode) {
- UnMimeHeader(msgblk.headers);
- }
/* Check for MIME headers indicating possible 8-bit data */
ctl->mimemsg = MimeBodyType(msgblk.headers, ctl->mimedecode);