[mutt] 01/02: upstream/865822-restore-defaults.patch created to set the default values of variables after they have been set in the init function (Closes: 865842, 865822).

Antonio Radici antonio at moszumanska.debian.org
Sun Jun 25 21:50:52 UTC 2017


This is an automated email from the git hooks/post-receive script.

antonio pushed a commit to branch master
in repository mutt.

commit e71b6806d29343bc6c95b609ce742fcd23daaf62
Author: Antonio Radici <antonio at debian.org>
Date:   Sun Jun 25 22:44:59 2017 +0100

    upstream/865822-restore-defaults.patch created to set the default values of variables after they have been set in the init function (Closes: 865842, 865822).
---
 debian/changelog                                   |  3 ++
 debian/patches/series                              |  1 +
 .../patches/upstream/865822-restore-defaults.patch | 42 ++++++++++++++++++++++
 3 files changed, 46 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 68fefb6..55cfab1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ mutt (1.8.3+neomutt20170609-2) UNRELEASED; urgency=medium
   * debian/patches:
     + upstream/644992-ipv6-literal.patch removed, already upstream.
     + upstream/771125-CVE-2014-9116-jessie.patch removed, already upstream.
+    + upstream/865822-restore-defaults.patch created to set the default values
+      of variables after they have been set in the init function
+      (Closes: 865842, 865822).
 
  -- Antonio Radici <antonio at debian.org>  Sun, 25 Jun 2017 10:00:09 +0100
 
diff --git a/debian/patches/series b/debian/patches/series
index 0b1dc27..ef29347 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,3 +14,4 @@ upstream/693993-manpage-corrections.patch
 upstream/749483-conststrings.patch
 upstream/fix_doc_builddir.patch
 upstream/fix_spelling_error.patch
+upstream/865822-restore-defaults.patch
diff --git a/debian/patches/upstream/865822-restore-defaults.patch b/debian/patches/upstream/865822-restore-defaults.patch
new file mode 100644
index 0000000..9de6611
--- /dev/null
+++ b/debian/patches/upstream/865822-restore-defaults.patch
@@ -0,0 +1,42 @@
+This patch moves the set_default/restore_default couple after the defaults have
+been set by the init function; this was correctly placed in 1.7.2 and somehow it
+got moved to the wrong place, which means that tmpdir (and many other variable)
+are not correctly set with their new default value determined from environment
+variables (or other logic), so when they get resetted with a 'reset all' call in
+.muttrc, they will never have the correct default to fall back to and they will
+use the wrong one in init.h
+
+This patch fixes:
+http://bugs.debian.org/865822
+http://bugs.debian.org/865842
+
+--- a/init.c
++++ b/init.c
+@@ -4007,13 +4007,6 @@
+     Shell = safe_strdup((p = getenv("SHELL")) ? p : "/bin/sh");
+   }
+ 
+-  /* Set standard defaults */
+-  for (int i = 0; MuttVars[i].option; i++)
+-  {
+-    set_default(&MuttVars[i]);
+-    restore_default(&MuttVars[i]);
+-  }
+-
+ #ifdef DEBUG
+   /* Start up debugging mode if requested from cmdline */
+   if (debuglevel_cmdline > 0)
+@@ -4164,6 +4157,13 @@
+ 
+   Matches = safe_calloc(Matches_listsize, sizeof(char *));
+ 
++  /* Set standard defaults */
++  for (int i = 0; MuttVars[i].option; i++)
++  {
++    set_default(&MuttVars[i]);
++    restore_default(&MuttVars[i]);
++  }
++
+   CurrentMenu = MENU_MAIN;
+ 
+ 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mutt/mutt.git



More information about the pkg-mutt-commits mailing list