aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/camel-mime-parser.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
index 6b68013401..7d7737359e 100644
--- a/camel/camel-mime-parser.c
+++ b/camel/camel-mime-parser.c
@@ -951,7 +951,8 @@ folder_push_part(struct _header_scan_state *s, struct _header_scan_stack *h)
if (s->parts && s->parts->atleast > h->boundarylenfinal)
h->atleast = s->parts->atleast;
else
- h->atleast = h->boundarylenfinal;
+ /* boundarylen should never be zero, but just incase */
+ h->atleast = MAX(h->boundarylenfinal, 1);
h->parent = s->parts;
s->parts = h;
@@ -1010,8 +1011,8 @@ folder_scan_skip_line(struct _header_scan_state *s)
s->atleast = atleast;
- return -1; /* not found */
- }
+ return -1; /* not found */
+}
/* TODO: Is there any way to make this run faster? It gets called a lot ... */
static struct _header_scan_stack *