aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/bbdb/ChangeLog6
-rw-r--r--plugins/bbdb/bbdb.c36
2 files changed, 27 insertions, 15 deletions
diff --git a/plugins/bbdb/ChangeLog b/plugins/bbdb/ChangeLog
index a22f7faae0..5def505a3e 100644
--- a/plugins/bbdb/ChangeLog
+++ b/plugins/bbdb/ChangeLog
@@ -1,3 +1,9 @@
+2005-07-28 Vivek Jain <jvivek@novell.com>
+
+ * bbdb.c:(bbdb_handle_reply):check for NULL
+ before using the address.
+ **Fixes bugs like #274544
+
2005-05-11 Not Zed <NotZed@Ximian.com>
* Makefile.am: setup cleanfiles/built_sources
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c
index c8dcaf7edb..7ac34375f6 100644
--- a/plugins/bbdb/bbdb.c
+++ b/plugins/bbdb/bbdb.c
@@ -115,11 +115,13 @@ bbdb_handle_reply (EPlugin *ep, EMEventTargetMessage *target)
return;
cia = camel_mime_message_get_from (target->message);
- for (i = 0; i < camel_address_length (CAMEL_ADDRESS (cia)); i ++) {
- const char *name=NULL, *email=NULL;
- if (!(camel_internet_address_get (cia, i, &name, &email)))
- continue;
- bbdb_do_it (book, name, email);
+ if (cia) {
+ for (i = 0; i < camel_address_length (CAMEL_ADDRESS (cia)); i ++) {
+ const char *name=NULL, *email=NULL;
+ if (!(camel_internet_address_get (cia, i, &name, &email)))
+ continue;
+ bbdb_do_it (book, name, email);
+ }
}
/* If this is a reply-all event, process To: and Cc: also. */
@@ -129,19 +131,23 @@ bbdb_handle_reply (EPlugin *ep, EMEventTargetMessage *target)
}
cia = camel_mime_message_get_recipients (target->message, CAMEL_RECIPIENT_TYPE_TO);
- for (i = 0; i < camel_address_length (CAMEL_ADDRESS (cia)); i ++) {
- const char *name=NULL, *email=NULL;
- if (!(camel_internet_address_get (cia, i, &name, &email)))
- continue;
- bbdb_do_it (book, name, email);
+ if (cia) {
+ for (i = 0; i < camel_address_length (CAMEL_ADDRESS (cia)); i ++) {
+ const char *name=NULL, *email=NULL;
+ if (!(camel_internet_address_get (cia, i, &name, &email)))
+ continue;
+ bbdb_do_it (book, name, email);
+ }
}
cia = camel_mime_message_get_recipients (target->message, CAMEL_RECIPIENT_TYPE_CC);
- for (i = 0; i < camel_address_length (CAMEL_ADDRESS (cia)); i ++) {
- const char *name=NULL, *email=NULL;
- if (!(camel_internet_address_get (cia, i, &name, &email)))
- continue;
- bbdb_do_it (book, name, email);
+ if (cia) {
+ for (i = 0; i < camel_address_length (CAMEL_ADDRESS (cia)); i ++) {
+ const char *name=NULL, *email=NULL;
+ if (!(camel_internet_address_get (cia, i, &name, &email)))
+ continue;
+ bbdb_do_it (book, name, email);
+ }
}
g_object_unref (G_OBJECT (book));