aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-display.c6
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 <trow@ximian.com>
+
+ * 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 <iain@ximian.com>
* 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);