From cd3f5e1a934b9952ca718e0c5bc1471b3884020c Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Mon, 16 Oct 2017 18:40:44 +0300 Subject: [PATCH 1/4] cli/crypto: fix segfault on failed gmime2 crypto context creation Commit 1fdc08d0ffab ("cli/crypto: treat failure to create a crypto context as fatal.") started treating crypto context creation failures "as fatal", returning NULL from _mime_node_create(). Unfortunately, we do not have NULL checks for _mime_node_create() failures. The only caller, mime_node_child(), could check and return NULL (as it's documented to do on errors) but none of the several call sites have NULL checks either. And none of them really have a trivial but feasible and graceful way of recovery. So while the right thing to do would be to handle NULL returns properly all over the place, and we have other scenarios that do return NULL from above mentioned functions, the crypto context creation failure is something that does seem to show up regularly in some scenarios, revert back to the functionality before commit 1fdc08d0ffab as an interim fix. --- mime-node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mime-node.c b/mime-node.c index bb0870d0..16091735 100644 --- a/mime-node.c +++ b/mime-node.c @@ -247,7 +247,7 @@ _mime_node_create (mime_node_t *parent, GMimeObject *part) const char *protocol = g_mime_content_type_get_parameter (content_type, "protocol"); cryptoctx = notmuch_crypto_get_context (node->ctx->crypto, protocol); if (!cryptoctx) - return NULL; + return node; } #endif From 58bf820b78f90c3db57fdd95a73fe76dc800733f Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 5 Nov 2017 19:54:40 -0400 Subject: [PATCH 2/4] NEWS for 0.25.2 --- NEWS | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/NEWS b/NEWS index 3c8198d3..24e7982c 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,18 @@ +Notmuch 0.25.2 (2017-11-05) +=========================== + +Command Line Interface +---------------------- + +Fix segfault in notmuch-show crypto handling when compiled against +GMime 2.6; this was a regression in 0.25. + +General +------- + +Support for GMime before 3.0 is now deprecated, and will be removed in +a future release. + Notmuch 0.25.1 (2017-09-11) =========================== From 42871517c62c3b528d3b1ed792a7317877573345 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 5 Nov 2017 19:59:30 -0400 Subject: [PATCH 3/4] version: bump to 0.25.2 --- bindings/python/notmuch/version.py | 2 +- version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/python/notmuch/version.py b/bindings/python/notmuch/version.py index afd59190..36aaaeb7 100644 --- a/bindings/python/notmuch/version.py +++ b/bindings/python/notmuch/version.py @@ -1,3 +1,3 @@ # this file should be kept in sync with ../../../version -__VERSION__ = '0.25.1' +__VERSION__ = '0.25.2' SOVERSION = '5' diff --git a/version b/version index af2dabf3..166c9e29 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.25.1 +0.25.2 From 83f266136369452b859393429b8530efac2e09fb Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 5 Nov 2017 20:06:23 -0400 Subject: [PATCH 4/4] debian: changelog for 0.25.2-1 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index d67d84f1..67282a07 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +notmuch (0.25.2-1) unstable; urgency=medium + + * New upstream bugfix release: fix for segfault when compiled + against gmime-2.6 + + -- David Bremner Sun, 05 Nov 2017 20:05:49 -0400 + notmuch (0.25.1-1) unstable; urgency=medium * new upstream bugfix release: mitigation for emacs bug 28350