]> granicus.if.org Git - neomutt/commitdiff
Change mutt_addr_is_user() to no for a NULL address
authorKevin McCarthy <kevin@8t8.us>
Sun, 26 May 2019 23:03:40 +0000 (16:03 -0700)
committerRichard Russon <rich@flatcap.org>
Thu, 6 Jun 2019 23:50:20 +0000 (00:50 +0100)
The behavior is generating a false 'F' flag for a spam message with an
unparsable From address.

After reviewing the callers, I can't see a reason returning 'yes' in
this case.

Co-authored-by: Richard Russon <rich@flatcap.org>
alias.c

diff --git a/alias.c b/alias.c
index 5ae0ce069d830b63e04a6ae3db4ad5fe7f9ca83c..a39295a8b6446c8fc64b45072acf4782750b2df6 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -669,11 +669,10 @@ int mutt_alias_complete(char *buf, size_t buflen)
  */
 bool mutt_addr_is_user(const struct Address *addr)
 {
-  /* NULL address is assumed to be the user. */
   if (!addr)
   {
-    mutt_debug(5, "yes, NULL address\n");
-    return true;
+    mutt_debug(5, "no, NULL address\n");
+    return false;
   }
   if (!addr->mailbox)
   {