From 93732f7256027b1f90d92303aab28e479e0a2c00 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Tue, 7 Dec 2010 22:24:49 +0100 Subject: [PATCH] Be more conservative about when not to apply binary searching for the next boundary or not. --- libcitadel/lib/mime_parser.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libcitadel/lib/mime_parser.c b/libcitadel/lib/mime_parser.c index e3d04bb01..3b10588b7 100644 --- a/libcitadel/lib/mime_parser.c +++ b/libcitadel/lib/mime_parser.c @@ -472,11 +472,15 @@ static long parse_MimeHeaders(interesting_mime_headers *m, static int IsAsciiEncoding(interesting_mime_headers *m) { + if ((m->b[encoding].len != 0) && - (strcmp(m->b[encoding].Key, "binary") == 0)) - return 0; - else + (strcasecmp(m->b[encoding].Key, "base64") == 0)) + return 1; + if ((m->b[encoding].len != 0) && + (strcmp(m->b[encoding].Key, "quoted-printable") == 0)) return 1; + + return 0; } static char *FindNextContent(char *ptr, -- 2.30.2