Bug: SIGABRT if "notmuch dump" output file is not writeable

David Bremner david at tethera.net
Tue Jul 23 11:53:42 PDT 2019


Ralph Seichter <abbot at monksofcool.net> writes:

> gzclose_w(output) has already been called in line 332, before Notmuch
> attempts to rename the temp file to the output file. At that point,
> 'output' should be set to null as it is being checked later, but that
> erroneously only happens in case the close operation fails.
>
> The rename in line 341 fails because of permission/ownership issues,
> 'ret' contains the error code for that, 'output' is still non-null, so
> gzclose_w is called again -- ergo boom.

That sounds plausible to me. Thanks for thinking about this longer than
I did. I'll be happy to look at a patch.

d


More information about the notmuch mailing list