X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=alias.c;h=03482c61f4dee12cd12f263de46d6301a9e04c56;hb=bb89a1ca75e867edbe281dc848720a95650c24ce;hp=fdf74c0a8bcd0f4fda692fef1d385d0c7f1cfefc;hpb=b23d5033080fe9f9fba038e3cf1e3ec2b0a0d33d;p=apps%2Fmadmutt.git diff --git a/alias.c b/alias.c index fdf74c0..03482c6 100644 --- a/alias.c +++ b/alias.c @@ -107,10 +107,10 @@ int mutt_addr_is_user(address_t *addr) if (!addr->mailbox) return 0; - if (!ascii_strcasecmp(addr->mailbox, Username) - || string_is_address(addr->mailbox, Username, Hostname) - || string_is_address(addr->mailbox, Username, mutt_fqdn(0)) - || string_is_address(addr->mailbox, Username, mutt_fqdn(1)) + if (!ascii_strcasecmp(addr->mailbox, MCore.username) + || string_is_address(addr->mailbox, MCore.username, Hostname) + || string_is_address(addr->mailbox, MCore.username, mutt_fqdn(0)) + || string_is_address(addr->mailbox, MCore.username, mutt_fqdn(1)) || (From && !ascii_strcasecmp(From->mailbox, addr->mailbox))) { return 1; @@ -160,7 +160,8 @@ static int alias_sanitize(const char *s, char *d) s++; } - *d = '\0'; + if (d) + *d = '\0'; return rv; } @@ -286,7 +287,7 @@ void mutt_create_alias(ENVELOPE *cur, address_t *iadr) return; } - mutt_expand_path(buf, sizeof (buf)); + mutt_expand_path(buf, sizeof(buf)); rc = safe_fopen (buf, "a"); if (rc) {