]> code.citadel.org Git - citadel.git/blobdiff - libcitadel/lib/mime_parser.c
Mimeparser rewrite; fix bug detecting trailing MIME-Boundary
[citadel.git] / libcitadel / lib / mime_parser.c
index 86905f1ee60fe54cd93cf624937f7de988e8ccef..f2aec777ab1b41774aed4cc5ed946fed9197ab79 100644 (file)
@@ -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 {