]> granicus.if.org Git - neomutt/commitdiff
fix: crash using uncolor (#833)
authorRichard Russon <rich@flatcap.org>
Tue, 10 Oct 2017 09:27:08 +0000 (10:27 +0100)
committerPietro Cerutti <gahr@gahr.ch>
Tue, 10 Oct 2017 09:27:08 +0000 (10:27 +0100)
Using 'uncolor' on the last 'color' added would cause a crash.

color.c

diff --git a/color.c b/color.c
index d1683303436636ede388a869665319bddd7ffbfb..7785a13ca9a108ce14e118f2525a4fc725348ce0 100644 (file)
--- a/color.c
+++ b/color.c
@@ -470,7 +470,7 @@ static void do_uncolor(struct Buffer *buf, struct Buffer *s,
           {
             *do_cache = 1;
           }
-          mutt_debug(1, "Freeing pattern \"%s\" from ColorList\n", tmp->pattern);
+          mutt_debug(1, "Freeing pattern \"%s\" from ColorList\n", buf->data);
           if (tmp)
             STAILQ_REMOVE_AFTER(cl, tmp, entries);
           else