]> granicus.if.org Git - neomutt/commitdiff
Fix missing NONULL for mutt.set() in Lua (#578)
authorguyzmo <guyzmo+github+pub@m0g.net>
Sat, 13 May 2017 12:50:25 +0000 (14:50 +0200)
committerRichard Russon <rich@flatcap.org>
Sat, 13 May 2017 12:50:25 +0000 (13:50 +0100)
fixes #567

Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
init.c

diff --git a/init.c b/init.c
index 1c14825701f442ac003f54f2c55a0f013d0efbe5..33c5590da43e43cf121958b5d0fcd3b6a73b8794 100644 (file)
--- a/init.c
+++ b/init.c
@@ -436,7 +436,7 @@ int mutt_option_set(const struct option_t *val, BUFFER *err)
       case DT_PATH:
       {
         char scratch[LONG_STRING];
-        strfcpy(scratch, (const char *) val->data, sizeof(scratch));
+        strfcpy(scratch, NONULL((const char *) val->data), sizeof(scratch));
         mutt_expand_path(scratch, sizeof(scratch));
         /* MuttVars[idx].data is already 'char**' (or some 'void**') or...
         * so cast to 'void*' is okay */