From: Wilfried Goesgens Date: Sat, 15 Jan 2011 15:14:16 +0000 (+0100) Subject: Mimeparser rewrite; fix bug detecting trailing MIME-Boundary X-Git-Tag: v8.11~1111 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=a1ff38c40375ef988a168fc6eb6a2060042077d4 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. --- 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 {