]> granicus.if.org Git - neomutt/commitdiff
defect 190857: Dereference after null check
authorRichard Russon <rich@flatcap.org>
Sat, 2 Mar 2019 14:57:12 +0000 (14:57 +0000)
committerRichard Russon <rich@flatcap.org>
Sun, 3 Mar 2019 00:56:07 +0000 (00:56 +0000)
hook.c

diff --git a/hook.c b/hook.c
index 6aef4adaedddbc5b6eec2de24eb055d412f8036e..cf5d95c74a6a56b22ef20bc8fb0b873ccd5e3530 100644 (file)
--- 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;
       }
     }