]> granicus.if.org Git - mutt/commitdiff
Fix mutt/2189; lack of error checking in the query code.
authorThomas Roessler <roessler@does-not-exist.org>
Fri, 3 Mar 2006 09:55:46 +0000 (09:55 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Fri, 3 Mar 2006 09:55:46 +0000 (09:55 +0000)
query.c

diff --git a/query.c b/query.c
index 6e61efccdc4be00960f30a6d6fdd80de85b85537..4dabceedd7fe6cf6a875c397757a165332c8ce8b 100644 (file)
--- a/query.c
+++ b/query.c
@@ -64,7 +64,8 @@ static ADDRESS *result_to_addr (QUERY *r)
 {
   static ADDRESS *tmp;
   
-  tmp = rfc822_cpy_adr (r->addr);
+  if (!(tmp = rfc822_cpy_adr (r->addr)))
+    return NULL;
   
   if(!tmp->next && !tmp->personal)
     tmp->personal = safe_strdup (r->name);