Ticket #2017 (new defect)

Opened 3 years ago

Last modified 3 months ago

mutt_addr_is_user() "null address is assumed to be the user"

Reported by: ttakah@… Owned by: mutt-dev
Priority: trivial Milestone:
Component: mutt Version: 1.5.9
Keywords: Cc: vinc17

Description

In alias.c, mutt_addr_is_user():
>   /* NULL address is assumed to be the user. */
>   if (!addr)
>   {
>     dprint (5, (debugfile, "mail_addr_is_user: yes, NULL address\n"));
>     return 1;
>   }

This causes a strange effect: A message with no headers is shown
as sent from me, on the index menu.

I'm afraid mutt_addr_is_user() is misused at almost all its
occurences. We should not assume that env->from matches $alternates
just because mutt_addr_is_user(env->from) returns 1.

Why not return 0?

>How-To-Repeat:
Delete FROM header of a message.
The message will be flagged as "F" with the default $to_chars and $index_format.

>Fix:
Simply return 0?
But that could have side effects.

Change History

Changed 3 months ago by vinc17

  • cc vinc17 added
Note: See TracTickets for help on using tickets.