]> granicus.if.org Git - mutt/commitdiff
Fix the "strange e-mail header" bug. It was an uninitialized
authorThomas Roessler <roessler@does-not-exist.org>
Sun, 12 Aug 2001 10:15:15 +0000 (10:15 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Sun, 12 Aug 2001 10:15:15 +0000 (10:15 +0000)
buffer.  Thanks to Brendan Cully for figuring it out.

init.c
init.h

diff --git a/init.c b/init.c
index 4130f395ab378df1a5817a08500bdae3a0428b79..0540b107c7d8c9bcfc1679e122f94c86f4bcf49d 100644 (file)
--- a/init.c
+++ b/init.c
@@ -633,6 +633,7 @@ static void mutt_set_default (struct option_t *p)
       if (!p->init && *((ADDRESS **) p->data))
       {
        char tmp[HUGE_STRING];
+       *tmp = '\0';
        rfc822_write_address (tmp, sizeof (tmp), *((ADDRESS **) p->data));
        p->init = (unsigned long) safe_strdup (tmp);
       }
diff --git a/init.h b/init.h
index 9031f7fd090a900337069aa3133a9b05f5f2c0dd..31bb4fa1e3f38fe1d0aaec34d0afab1728db1512 100644 (file)
--- a/init.h
+++ b/init.h
@@ -577,7 +577,7 @@ struct option_t MuttVars[] = {
   { "forw_quote",      DT_SYN,  R_NONE, UL "forward_quote", 0 },
   /*
   */
-  { "from",            DT_ADDR, R_NONE, UL &From, 0 },
+  { "from",            DT_ADDR, R_NONE, UL &From, UL 0 },
   /*
   ** .pp
   ** When set, this variable contains a default from address.  It