aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary-preferences.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-09-27 03:22:33 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-09-27 03:22:33 +0800
commit97cc462bb3d8d2094a989723fb02cfd54901b207 (patch)
tree4e70ef1a76031c1878d78ba16655b9c8fde5a22b /my-evolution/e-summary-preferences.c
parentb3dddffe69053980eb212742ed1824da29d56ebb (diff)
downloadgsoc2013-evolution-97cc462bb3d8d2094a989723fb02cfd54901b207.tar.gz
gsoc2013-evolution-97cc462bb3d8d2094a989723fb02cfd54901b207.tar.zst
gsoc2013-evolution-97cc462bb3d8d2094a989723fb02cfd54901b207.zip
(folder_list_from_vector): Do some
sanity checking so we don't crash miserably as in #28481. svn path=/trunk/; revision=18238
Diffstat (limited to 'my-evolution/e-summary-preferences.c')
-rw-r--r--my-evolution/e-summary-preferences.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/my-evolution/e-summary-preferences.c b/my-evolution/e-summary-preferences.c
index 5201dae83d..b86792bd06 100644
--- a/my-evolution/e-summary-preferences.c
+++ b/my-evolution/e-summary-preferences.c
@@ -181,11 +181,20 @@ folder_list_from_vector (const char *vector)
for (tokens = t; *tokens; tokens += 2) {
ESummaryPrefsFolder *folder;
+ const char *evolution_uri;
+ const char *physical_uri;
+
+ evolution_uri = *tokens;
+ if (evolution_uri == NULL || strncmp (evolution_uri, "evolution:", 10) != 0)
+ break;
+
+ physical_uri = *(tokens + 1);
+ if (physical_uri == NULL)
+ break;
folder = g_new (ESummaryPrefsFolder, 1);
- g_print ("%s - %s\n", *tokens, *(tokens + 1));
- folder->evolution_uri = g_strdup (*tokens);
- folder->physical_uri = g_strdup (*(tokens + 1));
+ folder->evolution_uri = g_strdup (evolution_uri);
+ folder->physical_uri = g_strdup (physical_uri);
flist = g_list_prepend (flist, folder);
}