[PATCH] crypto: gracefully handle gmime errors

Jan Malakhovski oxij at oxij.org
Thu Aug 31 06:44:56 PDT 2017


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


More information about the notmuch mailing list