aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-01-28 04:19:21 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-28 04:19:21 +0800
commit613b4a4b5c420cbb45e35e3251f00258b02fb0f8 (patch)
tree0fe76bdcd0cec0ae44d4f2960551ccf89f603f1a /mail
parent95400445b977d46cfcbd1862b6c60a5dcb85c99b (diff)
downloadgsoc2013-evolution-613b4a4b5c420cbb45e35e3251f00258b02fb0f8.tar
gsoc2013-evolution-613b4a4b5c420cbb45e35e3251f00258b02fb0f8.tar.gz
gsoc2013-evolution-613b4a4b5c420cbb45e35e3251f00258b02fb0f8.tar.bz2
gsoc2013-evolution-613b4a4b5c420cbb45e35e3251f00258b02fb0f8.tar.lz
gsoc2013-evolution-613b4a4b5c420cbb45e35e3251f00258b02fb0f8.tar.xz
gsoc2013-evolution-613b4a4b5c420cbb45e35e3251f00258b02fb0f8.tar.zst
gsoc2013-evolution-613b4a4b5c420cbb45e35e3251f00258b02fb0f8.zip
Protect against NULL address pointers. (subject_compare): Same but for
2001-01-27 Jeffrey Stedfast <fejj@ximian.com> * message-list.c (address_compare): Protect against NULL address pointers. (subject_compare): Same but for subject pointers. svn path=/trunk/; revision=7863
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/message-list.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 165ddfa3a8..c92502803c 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2001-01-27 Jeffrey Stedfast <fejj@ximian.com>
+
+ * message-list.c (address_compare): Protect against NULL address
+ pointers.
+ (subject_compare): Same but for subject pointers.
+
2001-01-27 Iain Holmes <iain@ximian.com>
* mail-summary.c (create_summary_view): Applied patch from John R Sheets
diff --git a/mail/message-list.c b/mail/message-list.c
index 9ce7d18aef..44d82c63f7 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -255,6 +255,9 @@ address_compare (gconstpointer address1, gconstpointer address2)
EMailAddress *addr1, *addr2;
gint retval;
+ g_return_val_if_fail (address1 != NULL, 1);
+ g_return_val_if_fail (address2 != NULL, -1);
+
addr1 = e_mail_address_new (address1);
addr2 = e_mail_address_new (address2);
retval = e_mail_address_compare (addr1, addr2);
@@ -270,6 +273,9 @@ subject_compare (gconstpointer subject1, gconstpointer subject2)
char *sub1;
char *sub2;
+ g_return_val_if_fail (subject1 != NULL, 1);
+ g_return_val_if_fail (subject2 != NULL, -1);
+
/* trim off any "Re:"'s at the beginning of subject1 */
sub1 = (char *) subject1;
while (!g_strncasecmp (sub1, "Re:", 3)) {