From dd1fd6f7f6f3e511f3271792135cb1f26afed43f Mon Sep 17 00:00:00 2001 From: jacob berkman Date: Wed, 8 Aug 2001 14:34:33 +0000 Subject: check for NULL name and addr (fixes a bug i was about to report) 2001-08-08 jacob berkman * camel-search-private.c (camel_search_header_match): check for NULL name and addr (fixes a bug i was about to report) svn path=/trunk/; revision=11786 --- camel/ChangeLog | 5 +++++ camel/camel-search-private.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 5c755c3191..80c7053000 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2001-08-08 jacob berkman + + * camel-search-private.c (camel_search_header_match): check for + NULL name and addr (fixes a bug i was about to report) + 2001-08-08 Not Zed * camel-filter-search.c (check_header): Properly determine match diff --git a/camel/camel-search-private.c b/camel/camel-search-private.c index b769a03e33..be90e69d99 100644 --- a/camel/camel-search-private.c +++ b/camel/camel-search-private.c @@ -425,8 +425,8 @@ camel_search_header_match (const char *value, const char *match, camel_search_ma if (camel_address_length((CamelAddress *)cia) == 1) { camel_internet_address_get(cia, 0, &name, &addr); - truth = header_match(name, match, how) - || header_match(addr, match, how); + truth = (name && header_match(name, match, how)) + || (addr && header_match(addr, match, how)); } camel_object_unref((CamelObject *)cia); break; -- cgit