diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/message-list.c | 6 |
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)) { |