From a1ff38c40375ef988a168fc6eb6a2060042077d4 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sat, 15 Jan 2011 16:14:16 +0100 Subject: [PATCH 1/1] Mimeparser rewrite; fix bug detecting trailing MIME-Boundary - when searching for the '--' after the mime boundary to detect whether its the last, we had an off by one. fixed. --- libcitadel/lib/mime_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcitadel/lib/mime_parser.c b/libcitadel/lib/mime_parser.c index 86905f1ee..f2aec777a 100644 --- a/libcitadel/lib/mime_parser.c +++ b/libcitadel/lib/mime_parser.c @@ -680,8 +680,8 @@ static void recurseable_mime_parser(char *partnum, if (next_boundary != NULL) { /* If we pass out of scope, don't attempt to * read past the end boundary. */ - if ((*(next_boundary + m->b[startary].len + 1) == '-') && - (*(next_boundary + m->b[startary].len + 2) == '-') ){ + if ((*(next_boundary + m->b[startary].len) == '-') && + (*(next_boundary + m->b[startary].len + 1) == '-') ){ ptr = content_end; } else { -- 2.39.2