[arch-commits] Commit in neomutt/trunk (PKGBUILD fix-vfolder-segfault.patch)
Maxim Baz
maximbaz at archlinux.org
Tue Dec 3 13:51:49 UTC 2019
Date: Tuesday, December 3, 2019 @ 13:51:47
Author: maximbaz
Revision: 534942
neomutt: apply patch to fix segfault, see FS#64715
The patch is already merged in master
Added:
neomutt/trunk/fix-vfolder-segfault.patch
Modified:
neomutt/trunk/PKGBUILD
----------------------------+
PKGBUILD | 5 ++++-
fix-vfolder-segfault.patch | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 1 deletion(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-12-03 13:44:41 UTC (rev 534941)
+++ PKGBUILD 2019-12-03 13:51:47 UTC (rev 534942)
@@ -5,7 +5,7 @@
# Contributor: Leonidas Spyropoulos <artafinde at gmail.com>
pkgname=neomutt
pkgver=20191129
-pkgrel=2
+pkgrel=3
pkgdesc='A version of mutt with added features'
url='https://neomutt.org/'
license=('GPL')
@@ -18,14 +18,17 @@
_github='https://github.com/neomutt/neomutt'
source=("$pkgname-$pkgver.tar.gz::$_github/archive/$pkgver.tar.gz"
"$pkgname-$pkgver.tar.gz.sig::$_github/releases/download/$pkgver/$pkgver.tar.gz.sig"
+ "fix-vfolder-segfault.patch"
"default-ca-certificates.patch")
sha256sums=('c339e17b676d0a9a8db6dd1c9acac3db4b217c6b19050e5a1eec99b1b0b59a2f'
'SKIP'
+ 'fa6e03ea6ef031804bf4175c4ad0b9089fdb2552bc8271255e93d457c54adfe0'
'410a364ae8249c969fc321f0f50ecb4603e9443bd73b31f58c8487e6b8b510e0')
validpgpkeys=('86C2397270DD7A561263CA4E5FAF0A6EE7371805') # Richard Russon (flatcap) <rich at flatcap.org>
prepare() {
cd "$pkgname-$pkgver"
+ patch -Np1 -i "$srcdir/fix-vfolder-segfault.patch"
patch -Np1 -i "$srcdir/default-ca-certificates.patch"
}
Added: fix-vfolder-segfault.patch
===================================================================
--- fix-vfolder-segfault.patch (rev 0)
+++ fix-vfolder-segfault.patch 2019-12-03 13:51:47 UTC (rev 534942)
@@ -0,0 +1,39 @@
+From e22f6a1ad4f83942a7ea2240337b99a2ee9a3e89 Mon Sep 17 00:00:00 2001
+From: Richard Russon <rich at flatcap.org>
+Date: Mon, 2 Dec 2019 13:02:49 +0000
+Subject: [PATCH] fix: crash resizing notmuch mailbox
+
+Fixes: #2014
+---
+ mx.c | 2 +-
+ notmuch/mutt_notmuch.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/mx.c b/mx.c
+index 4a5c1c55b..1e13fd78a 100644
+--- a/mx.c
++++ b/mx.c
+@@ -1181,7 +1181,7 @@ void mx_alloc_memory(struct Mailbox *m)
+ m->emails = mutt_mem_calloc(m->email_max, sizeof(struct Email *));
+ m->v2r = mutt_mem_calloc(m->email_max, sizeof(int));
+ }
+- for (int i = m->msg_count; i < m->email_max; i++)
++ for (int i = m->email_max - 25; i < m->email_max; i++)
+ {
+ m->emails[i] = NULL;
+ m->v2r[i] = -1;
+diff --git a/notmuch/mutt_notmuch.c b/notmuch/mutt_notmuch.c
+index 1078d4432..2c98d07c4 100644
+--- a/notmuch/mutt_notmuch.c
++++ b/notmuch/mutt_notmuch.c
+@@ -1980,8 +1980,8 @@ static int nm_mbox_check_stats(struct Mailbox *m, int flags)
+
+ /* all emails */
+ m->msg_count = count_query(db, db_query, limit);
+- m->email_max = MAX(m->email_max, m->msg_count);
+- mx_alloc_memory(m);
++ while (m->email_max < m->msg_count)
++ mx_alloc_memory(m);
+
+ // holder variable for extending query to unread/flagged
+ char *qstr = NULL;
More information about the arch-commits
mailing list