]> git.ipfire.org Git - thirdparty/libarchive.git/commit
archive_write: Set archive state to fatal if format or filters fail 2729/head
authorDag-Erling Smørgrav <des@des.no>
Mon, 8 Sep 2025 20:17:09 +0000 (22:17 +0200)
committerDag-Erling Smørgrav <des@des.no>
Mon, 8 Sep 2025 21:33:32 +0000 (23:33 +0200)
commit4768f3853590cd8a9af130dac0b9561253e01a67
treeff6f787ac5e7490e245e072853e801e39a953df9
parent3a072e0bb0d6084dd0741440d31896a314d1f2ea
archive_write: Set archive state to fatal if format or filters fail

In archive_write_header(), if the format method or a filter flush method
fails, we set the archive state to fatal, but we did not do this in
archive_write_data() or archive_write_finish_entry().  There is no good
reason for this discrepancy.  Not setting the archive state to fatal
means a subsequent archive_write_free() will invoke archive_write_close()
which may retry the operation and cause archive_write_free() to return
an unexpected ARCHIVE_FATAL.
libarchive/archive_write.c