aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorNot Zed <NotZed@HelixCode.com>2000-11-11 12:01:14 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-11-11 12:01:14 +0800
commite0e04e97756092752ce96dfdbaae7ac3afbaf274 (patch)
treeb8680daeb3fde6ffea1b22f52a06f987657a5d7f /camel
parentb4ac09c954e1a8e45c0d487841c8b49915756a0f (diff)
downloadgsoc2013-evolution-e0e04e97756092752ce96dfdbaae7ac3afbaf274.tar
gsoc2013-evolution-e0e04e97756092752ce96dfdbaae7ac3afbaf274.tar.gz
gsoc2013-evolution-e0e04e97756092752ce96dfdbaae7ac3afbaf274.tar.bz2
gsoc2013-evolution-e0e04e97756092752ce96dfdbaae7ac3afbaf274.tar.lz
gsoc2013-evolution-e0e04e97756092752ce96dfdbaae7ac3afbaf274.tar.xz
gsoc2013-evolution-e0e04e97756092752ce96dfdbaae7ac3afbaf274.tar.zst
gsoc2013-evolution-e0e04e97756092752ce96dfdbaae7ac3afbaf274.zip
Make sure 'atleast' is at least 1, always. This is possibly a temporary
2000-11-11 Not Zed <NotZed@HelixCode.com> * camel-mime-parser.c (folder_push_part): Make sure 'atleast' is at least 1, always. This is possibly a temporary fix for a bad failure mode on bad multipart messages. svn path=/trunk/; revision=6540
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 *