From: Richard Russon Date: Sat, 2 Mar 2019 14:57:12 +0000 (+0000) Subject: defect 190857: Dereference after null check X-Git-Tag: 2019-10-25~344^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba639aa86c3c48b325af0441bfcc458988449b95;p=neomutt defect 190857: Dereference after null check --- diff --git a/hook.c b/hook.c index 6aef4adae..cf5d95c74 100644 --- a/hook.c +++ b/hook.c @@ -508,8 +508,7 @@ static int addr_hook(char *path, size_t pathlen, HookFlags type, struct Mailbox *m = ctx ? ctx->mailbox : NULL; if ((mutt_pattern_exec(hook->pattern, 0, m, e, &cache) > 0) ^ hook->regex.not) { - mutt_make_string_flags(path, pathlen, hook->command, ctx, ctx->mailbox, - e, MUTT_FORMAT_PLAIN); + mutt_make_string_flags(path, pathlen, hook->command, ctx, m, e, MUTT_FORMAT_PLAIN); return 0; } }