aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-04-29 05:42:32 +0800
committerDan Winship <danw@src.gnome.org>2000-04-29 05:42:32 +0800
commit8283ee1835f02d738dbc7336e36dcb0a75ce052c (patch)
tree8cd382f05df00d681a9e1bb8cffcb0c2906e1580 /camel
parent9bc896ddb9f78727b6d736f1da2a7d7ea9dbf06f (diff)
downloadgsoc2013-evolution-8283ee1835f02d738dbc7336e36dcb0a75ce052c.tar
gsoc2013-evolution-8283ee1835f02d738dbc7336e36dcb0a75ce052c.tar.gz
gsoc2013-evolution-8283ee1835f02d738dbc7336e36dcb0a75ce052c.tar.bz2
gsoc2013-evolution-8283ee1835f02d738dbc7336e36dcb0a75ce052c.tar.lz
gsoc2013-evolution-8283ee1835f02d738dbc7336e36dcb0a75ce052c.tar.xz
gsoc2013-evolution-8283ee1835f02d738dbc7336e36dcb0a75ce052c.tar.zst
gsoc2013-evolution-8283ee1835f02d738dbc7336e36dcb0a75ce052c.zip
fix a bug that would cause corruption with very long headers.
* camel-mime-parser.c (folder_scan_header): fix a bug that would cause corruption with very long headers. svn path=/trunk/; revision=2675
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-mime-parser.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 65aef6ccc4..67ca228842 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-28 Dan Winship <danw@helixcode.com>
+
+ * camel-mime-parser.c (folder_scan_header): fix a bug that would
+ cause corruption with very long headers.
+
2000-04-27 Ettore Perazzoli <ettore@helixcode.com>
* providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..'
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
index decd43207c..6039c10d78 100644
--- a/camel/camel-mime-parser.c
+++ b/camel/camel-mime-parser.c
@@ -620,7 +620,7 @@ retry:
register int len = (s->outend - s->outbuf);
char *outnew;
- if (headerlen >= len) {
+ if (headerlen >= s->outend - s->outptr) {
len = (len+headerlen)*2+1;
outnew = g_realloc(s->outbuf, len);
s->outptr = s->outptr - s->outbuf + outnew;