You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
libarchive's mtree format handler is permissive — it matches free-form text such as a
plain gunzip'd text file and yields bogus entries for input that isn't really an mtree
specification. The default behavior preserves libarchive's output (including on the raw
entry points), but strict callers iterating with ArchiveIterator may want to reject the
match instead of acting on the invalid entries.
- Add ArchiveIteratorBuilder::mtree_format(bool); default true preserves libarchive's
permissive behavior, false rejects entries whose archive_format base mask indicates
ARCHIVE_FORMAT_MTREE
- Gate the rejection inside ArchiveIterator::unsafe_next_header on the new flag,
delegating to a module-private reject_mtree_format helper only when the caller opted
out
- Expose archive_format plus ARCHIVE_FORMAT_BASE_MASK / ARCHIVE_FORMAT_MTREE through the
FFI bindings and generate-ffi script so the rejection can consult libarchive's format
code
- Extend CHANGES.md and the crate-level docs to describe the iterator-only opt-out
- Add an integration test that feeds tests/fixtures/file.txt.gz through the iterator
with mtree_format(false) and asserts that the surface errors out
0 commit comments