[evolution-ews/gnome-3-4] Bug #680153 - Crash under message_info_from_db()



commit dac3c3e84f793b07b1bae66dae38c17476a4bafa
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jul 18 19:03:29 2012 +0200

    Bug #680153 - Crash under message_info_from_db()

 src/camel/camel-ews-summary.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/camel/camel-ews-summary.c b/src/camel/camel-ews-summary.c
index ac37c4d..f85d947 100644
--- a/src/camel/camel-ews-summary.c
+++ b/src/camel/camel-ews-summary.c
@@ -197,13 +197,17 @@ message_info_from_db (CamelFolderSummary *s,
 		gchar **values;
 
 		iinfo = (CamelEwsMessageInfo *) info;
-		values = g_strsplit (part, " ", -1);
+		if (part) {
+			values = g_strsplit (part, " ", -1);
 
-		iinfo->server_flags = g_ascii_strtoll (values[0], NULL, 10);
-		iinfo->item_type = g_ascii_strtoll (values[1], NULL, 10);
-		iinfo->change_key = g_strdup (values[2]);
+			if (values && values[0] && values[1] && values[2]) {
+				iinfo->server_flags = g_ascii_strtoll (values[0], NULL, 10);
+				iinfo->item_type = g_ascii_strtoll (values[1], NULL, 10);
+				iinfo->change_key = g_strdup (values[2]);
+			}
 
-		g_strfreev (values);
+			g_strfreev (values);
+		}
 	}
 
 	return info;



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