From 27c2f5dd5d2c88e8d7de49223f59354b606a5b2d Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Tue, 2 Oct 2001 04:33:47 +0000 Subject: Make sure we aren't dealing with a pathological message w/o a From: 2001-10-01 Jon Trowbridge * mail-display.c (on_url_requested): Make sure we aren't dealing with a pathological message w/o a From: header. (ebook_callback): Properly check that the address we queried matches the address on the current message. (Bug #10038) svn path=/trunk/; revision=13295 --- mail/ChangeLog | 7 +++++++ mail/mail-display.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index a5bcf0062d..d2819f162a 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2001-10-01 Jon Trowbridge + + * mail-display.c (on_url_requested): Make sure we aren't dealing + with a pathological message w/o a From: header. + (ebook_callback): Properly check that the address we queried + matches the address on the current message. (Bug #10038) + 2001-10-01 Iain Holmes * component-factory.c (component_factory_init): Check for errors. diff --git a/mail/mail-display.c b/mail/mail-display.c index 022654323a..a950bace5d 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -952,7 +952,7 @@ ebook_callback (EBook *book, const gchar *addr, ECard *card, gpointer data) /* We are extra anal, in case we are dealing with some sort of pathological message w/o a From: header. */ if (from != NULL && camel_internet_address_get (from, 0, &md_name, &md_addr)) { - if (md_addr != NULL && strcmp (addr, md_addr)) + if (md_addr != NULL && !strcmp (addr, md_addr)) mail_display_load_images (md); } } @@ -1026,7 +1026,9 @@ on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, g_datalist_set_data (md->data, "checking_from", GINT_TO_POINTER (1)); - if (camel_internet_address_get (from, 0, &name, &addr)) + + /* Make sure we aren't deal w/ some sort of a pathological message w/o a From: header */ + if (from != NULL && camel_internet_address_get (from, 0, &name, &addr)) e_book_query_address_locally (addr, ebook_callback, md); else gtk_html_end (html, handle, GTK_HTML_STREAM_ERROR); -- cgit v1.2.3