From f842b74c9a64a6ee4d77a0808a9a1d0110cc1c23 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 23 Oct 2000 20:28:32 +0000 Subject: Fix a "how could this have been working before" memory overrun bug found * providers/imap/camel-imap-command.c (imap_read_untagged): Fix a "how could this have been working before" memory overrun bug found by Vlad. svn path=/trunk/; revision=6129 --- camel/ChangeLog | 4 ++++ camel/providers/imap/camel-imap-command.c | 3 +++ 2 files changed, 7 insertions(+) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index 3af6acd80d..23a85a5c48 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,9 @@ 2000-10-23 Dan Winship + * providers/imap/camel-imap-command.c (imap_read_untagged): Fix a + "how could this have been working before" memory overrun bug + found by Vlad. + * camel-op-queue.[ch], camel-thread-proxy.[ch]: These should have gone away a long time ago. diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c index 4310bd90de..932bccfde8 100644 --- a/camel/providers/imap/camel-imap-command.c +++ b/camel/providers/imap/camel-imap-command.c @@ -281,6 +281,9 @@ imap_read_untagged (CamelImapStore *store, char *line, CamelException *ex) length--; } + /* Add the length of the post-literal line. */ + fulllen += strlen (line); + /* p points to the "{" in the line that starts the literal. * The length of the CR-less response must be less than or * equal to the length of the response with CRs, therefore -- cgit