From 8283ee1835f02d738dbc7336e36dcb0a75ce052c Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 28 Apr 2000 21:42:32 +0000 Subject: 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 --- camel/ChangeLog | 5 +++++ camel/camel-mime-parser.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 + + * camel-mime-parser.c (folder_scan_header): fix a bug that would + cause corruption with very long headers. + 2000-04-27 Ettore Perazzoli * 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; -- cgit v1.2.3