• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OSSystems / compress-tools-rs / 24838143339

23 Apr 2026 01:30PM UTC coverage: 78.557% (+0.7%) from 77.836%
24838143339

push

github

otavio
fix!: reject mtree specifications on archive entry points

libarchive's mtree format handler matches arbitrary free-form text, so inputs as innocuous
as a plain gunzip'd text file were being parsed as single-entry mtree "archives". This
defeats the guarantee added alongside the raw-handler removal, where archive entry points
are supposed to reliably reject non-archive bytes.

- After each successful archive_read_next_header, check archive_format and treat an mtree
  match the same way we treat the raw handler: return an Extraction error instead of
  yielding bogus entries
- Wire the check into list_archive_files, list_archive_entries, uncompress_archive,
  uncompress_archive_file, and ArchiveIterator (covering their _with_encoding and async
  siblings via the shared helpers)
- Expose archive_format plus ARCHIVE_FORMAT_BASE_MASK / ARCHIVE_FORMAT_MTREE through the
  FFI bindings and generate-ffi script
- Extend CHANGES.md and the crate-level docs to describe the mtree rejection alongside the
  existing raw-handler note
- Add regression tests that feed tests/fixtures/file.txt.gz through list_archive_files and
  ArchiveIterator to confirm both surfaces reject the mtree interpretation

28 of 29 new or added lines in 3 files covered. (96.55%)

68 existing lines in 3 files now uncovered.

2004 of 2551 relevant lines covered (78.56%)

94.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.87
/src/iterator.rs


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc