[evolution-data-server/gnome-2-32] Bug 629714 - endless loop in imapx_parse_status()



commit 71a207d6f3224dac048f088be5705603880d6471
Author: David Woodhouse <David Woodhouse intel com>
Date:   Tue Sep 14 22:57:18 2010 +0100

    Bug 629714 - endless loop in imapx_parse_status()

 camel/providers/imapx/camel-imapx-utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-utils.c b/camel/providers/imapx/camel-imapx-utils.c
index 5fd3346..1e89cf1 100644
--- a/camel/providers/imapx/camel-imapx-utils.c
+++ b/camel/providers/imapx/camel-imapx-utils.c
@@ -1760,7 +1760,7 @@ imapx_parse_status(CamelIMAPXStream *is, GError **error)
 		/* ignore anything we dont know about */
 		do {
 			tok = camel_imapx_stream_token(is, &token, &len, NULL);
-			if (tok == '\n') {
+			if (tok == '\n' || tok < 0) {
 				g_set_error (error, CAMEL_IMAPX_ERROR, 1, "server response truncated");
 				imapx_free_status(sinfo);
 				return NULL;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]