diff -u evolution-data-server-2.28.1/debian/changelog evolution-data-server-2.28.1/debian/changelog --- evolution-data-server-2.28.1/debian/changelog +++ evolution-data-server-2.28.1/debian/changelog @@ -1,3 +1,11 @@ +evolution-data-server (2.28.1-0ubuntu2~ppa1) karmic; urgency=low + + * debian/patches/01-protecting-against-null.patch: Adds a patch + to ensure that we don't check or duplicate strings that + are infact NULL. (LP: #498189) + + -- Ted Gould Fri, 18 Dec 2009 11:15:06 -0600 + evolution-data-server (2.28.1-0ubuntu1) karmic; urgency=low * New upstream version: only in patch2: unchanged: --- evolution-data-server-2.28.1.orig/debian/patches/01-protecting-against-null.patch +++ evolution-data-server-2.28.1/debian/patches/01-protecting-against-null.patch @@ -0,0 +1,105 @@ +diff -ur evolution-data-server-orig/camel/camel-db.c evolution-data-server-ted/camel/camel-db.c +--- evolution-data-server-orig/camel/camel-db.c 2009-10-17 18:08:43.000000000 -0500 ++++ evolution-data-server-ted/camel/camel-db.c 2009-12-18 10:15:16.000000000 -0600 +@@ -886,7 +886,9 @@ + + gint i; + for (i = 0; i < ncol; ++i) { +- if (!strcmp (name [i], "uid")) ++ if (name[i] == NULL || cols[i] == NULL) ++ continue; ++ else if (!strcmp (name [i], "uid")) + g_ptr_array_add (data->uids, (gchar *) (camel_pstring_strdup(cols [i]))); + else if (!strcmp (name [i], "flags")) + g_ptr_array_add (data->flags, GUINT_TO_POINTER(strtoul (cols [i], NULL, 10))); +@@ -933,6 +935,7 @@ + g_ptr_array_add (array, (gchar *) (camel_pstring_strdup(cols [i]))); + } + #else ++ if (cols[0] != NULL) + g_ptr_array_add (array, (gchar *) (camel_pstring_strdup(cols [0]))); + #endif + +@@ -1002,7 +1005,9 @@ + gint i; + + for (i = 0; i < ncol; ++i) { +- if (!strcmp (name [i], "uid")) ++ if (name[i] == NULL || cols[i] == NULL) ++ continue; ++ else if (!strcmp (name [i], "uid")) + uid = camel_pstring_strdup(cols [i]); + else if (!strcmp (name [i], "preview")) + msg = g_strdup(cols[i]); +@@ -1060,6 +1065,7 @@ + g_ptr_array_add (array, (gchar *) (camel_pstring_strdup(cols [i]+8))); + } + #else ++ if (cols[0] != NULL) + g_ptr_array_add (array, (gchar *) (camel_pstring_strdup(cols [0]+8))); + #endif + +@@ -1451,7 +1457,9 @@ + #else + + for (i = 0; i < ncol; ++i) { +- if (!strcmp (name [i], "folder_name")) ++ if (name[i] == NULL || cols[i] == NULL) ++ continue; ++ else if (!strcmp (name [i], "folder_name")) + record->folder_name = g_strdup(cols [i]); + + else if (!strcmp (name [i], "version")) +diff -ur evolution-data-server-orig/camel/camel-folder-summary.c evolution-data-server-ted/camel/camel-folder-summary.c +--- evolution-data-server-orig/camel/camel-folder-summary.c 2009-10-17 18:08:43.000000000 -0500 ++++ evolution-data-server-ted/camel/camel-folder-summary.c 2009-12-18 10:34:43.000000000 -0600 +@@ -1119,7 +1119,9 @@ + + for (i = 0; i < ncol; ++i) { + +- if ( !strcmp (name [i], "uid") ) ++ if ( name[i] == NULL || cols[i] == NULL ) ++ continue; ++ else if ( !strcmp (name [i], "uid") ) + mir->uid = (gchar *) camel_pstring_strdup (cols [i]); + else if ( !strcmp (name [i], "flags") ) + mir->flags = cols [i] ? strtoul (cols [i], NULL, 10) : 0; +@@ -1184,7 +1186,7 @@ + mir_from_cols (mir, s, ncol, cols, name); + + CAMEL_SUMMARY_LOCK (s, summary_lock); +- if (g_hash_table_lookup (s->loaded_infos, mir->uid)) { ++ if (mir->uid == NULL || g_hash_table_lookup (s->loaded_infos, mir->uid)) { + /* Unlock and better return*/ + CAMEL_SUMMARY_UNLOCK (s, summary_lock); + camel_db_camel_mir_free (mir); +@@ -3257,6 +3259,8 @@ + + /* Extract User tags */ + part = record->usertags; ++ if (part != NULL) { ++ /* No indentation to simply diff */ + EXTRACT_FIRST_DIGIT (count) + for (i=0;imessage_info_from_db (s, mir); +- if (info) { ++ if (info != NULL && mir->bdata != NULL) { ++ /* We need the info, but also the flags */ + gchar *part = g_strdup (mir->bdata), *tmp; + tmp = part; + iinfo = (CamelImapMessageInfo *)info;