Re: [PATCH] crypto: gracefully handle gmime errors

Subject: Re: [PATCH] crypto: gracefully handle gmime errors

Date: Thu, 31 Aug 2017 13:44:56 +0000

To: notmuch@notmuchmail.org

Cc:

From: Jan Malakhovski


Hi.

On second though

@@ -354,6 +357,8 @@ _mime_node_seek_dfs_walk (mime_node_t *node, int *n)
     *n -= 1;
     for (i = 0; i < node->nchildren; i++) {
        mime_node_t *child = mime_node_child (node, i);
+	if (!child)
+	    return NULL;
        mime_node_t *ret = _mime_node_seek_dfs_walk (child, n);
        if (ret)
            return ret;

is probably an incorrect way to do this since the next child node can
succeed. Maybe it should be `continue` instead of `return NULL`. Not
sure.

Feel free to ignore this patch if there's a better way to fix those
SIGSEGVs. I get them by building against `gmime-2.6.23` and running
`tests/T355-smime.sh` and by trying to open some mails in my inbox
(which breaks display in emacs as `notmuch` just crashed in the middle
of an s-expression).

Cheers,
  Jan
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: