[mutt] 01/02: neomutt-devel/837416-avoid-segfault-when-listing-mailboxes-on-startup.patch: to prevent segfaulting when mutt -y is launched (Closes: 837416).
Antonio Radici
antonio at moszumanska.debian.org
Sun Sep 11 13:53:03 UTC 2016
This is an automated email from the git hooks/post-receive script.
antonio pushed a commit to branch master
in repository mutt.
commit 209701a9547bb793db711a2612a6ca145b697ce5
Author: Antonio Radici <antonio at debian.org>
Date: Sun Sep 11 14:41:08 2016 +0100
neomutt-devel/837416-avoid-segfault-when-listing-mailboxes-on-startup.patch: to prevent segfaulting when mutt -y is launched (Closes: 837416).
---
debian/changelog | 8 +++++
...egfault-when-listing-mailboxes-on-startup.patch | 38 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 47 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 4eed1a6..3e3b644 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mutt (1.7.0-4) UNRELEASED; urgency=medium
+
+ * debian/patches/neomutt-devel:
+ + 837416-avoid-segfault-when-listing-mailboxes-on-startup.patch: to prevent
+ segfaulting when mutt -y is launched (Closes: 837416).
+
+ -- Antonio Radici <antonio at debian.org> Sun, 11 Sep 2016 14:38:40 +0100
+
mutt (1.7.0-3) unstable; urgency=medium
* New upstream NeoMutt release, 2016-09-10.
diff --git a/debian/patches/neomutt-devel/837416-avoid-segfault-when-listing-mailboxes-on-startup.patch b/debian/patches/neomutt-devel/837416-avoid-segfault-when-listing-mailboxes-on-startup.patch
new file mode 100644
index 0000000..c300e2e
--- /dev/null
+++ b/debian/patches/neomutt-devel/837416-avoid-segfault-when-listing-mailboxes-on-startup.patch
@@ -0,0 +1,38 @@
+From 4f510cf69e9a236e512733e18e1ba56aaf182534 Mon Sep 17 00:00:00 2001
+From: John Swinbank <john at swinbank.org>
+Date: Sat, 10 Sep 2016 20:15:42 -0400
+Subject: [PATCH] Avoid segfault when listing mailboxes on startup.
+
+When mutt is started with the -y flag, _mutt_select_file() is called while
+CurrentFolder is a null pointer. If that's the case, we shouldn't try to use
+it.
+
+Closes: #137
+---
+ browser.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/browser.c b/browser.c
+index 83d8994..23be9a0 100644
+--- a/browser.c
++++ b/browser.c
+@@ -1128,11 +1128,14 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
+ * This code is executed only when we list files, not when
+ * we press up/down keys to navigate in a displayed list.
+ *
++ * We only do this when CurrentFolder has been set (ie, not
++ * when listing folders on startup with "mutt -y").
++ *
+ * This tracker is only used when browser_track is true,
+ * meaning only with sort methods SUBJECT/DESC for now.
+ */
+- if ((!LastDir[0]) ||
+- (mutt_strcmp (CurrentFolder, OldLastDir) != 0))
++ if (CurrentFolder && ((!LastDir[0]) ||
++ (mutt_strcmp (CurrentFolder, OldLastDir) != 0)))
+ {
+ mutt_browser_select_dir (CurrentFolder);
+ }
+--
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 85359a5..678f9ae 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,7 @@
neomutt-20160910.patch
neomutt-devel/fix-tarname-in-ac-init.patch
neomutt-devel/832971-reset-xlabel.patch
+neomutt-devel/837416-avoid-segfault-when-listing-mailboxes-on-startup.patch
debian-specific/Muttrc.patch
debian-specific/Md.etc_mailname_gethostbyname.patch
debian-specific/use_usr_bin_editor.patch
--
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