Skip to content

Commit

Permalink
fix(handlers): replace CPIO extractor (7z) by unblob based extractor.
Browse files Browse the repository at this point in the history
Multiple issues were identified in how 7z handles CPIO:
- processing of CPIO archives depends on the file name, and the rules
  are not explicit (name.cpio is OK, name.cpio.truncated is OK, but name.cpio.ext is not)
- special device files (e.g. block devices, character devices) are
  extracted as empty files rather than created using mknod

We therefore decided to implement a CPIO extractor based on unblob's
Extractor. Since CPIO has so many different format, each format has its
own extractor:

- binary CPIO (bin)- BinaryCPIOExtractor
- portable ASCII CPIO (odc) - PortableOldASCIIExtractor
- portable ASCII CPIO (newc) - PortableASCIIExtractor
- portable ASCII with CRC (crc) - PortableASCIIWithCRCExtractor

Each extractor use a different parser, adapted to the format.
  • Loading branch information
qkaiser committed Sep 8, 2023
1 parent d76dfef commit d0dff2f
Show file tree
Hide file tree
Showing 3 changed files with 326 additions and 129 deletions.
Loading

0 comments on commit d0dff2f

Please sign in to comment.