Patch for the TnyMaemoAccountStore



Hi,

this patch fixes a SIGSEV when ptr is NULL in the TnyMaemoAccountStore,
see the patch for details.

Br
Index: libtinymail-maemo/tny-maemo-account-store.c
===================================================================
--- libtinymail-maemo/tny-maemo-account-store.c	(revision 3431)
+++ libtinymail-maemo/tny-maemo-account-store.c	(working copy)
@@ -154,14 +154,14 @@
 	TnyMaemoAccountStorePriv *priv = TNY_MAEMO_ACCOUNT_STORE_GET_PRIVATE (self);
 
 	gchar *key = entry->key ? g_strdup (entry->key) : g_strdup ("");
-	gchar *ptr = strrchr (key, '/'); 
+	gchar *ptr = strrchr (key, '/');
 
-	if (ptr)
+	if (ptr) {
 		ptr++;
+		if (!strcmp (ptr, "count"))
+			kill_stored_accounts (priv);
+	}
 
-	if (!strcmp (ptr, "count"))
-		kill_stored_accounts (priv);
-
 	g_free (key);
 
 	return;


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