Skip to content

py7zr fails to extract a specific encrypted archive #589

Open
@lorddevereux

Description

@lorddevereux

I have a 7z archive created using 7zip 16.02 64bit on Ubuntu.
My client is using py7zr 0.21 on Python 3.8.11 on an embedded Linux machine.

The file has a password and encrypted headers.
The problem is that the file cannot be extracted on the client machine. The traceback:

Traceback (most recent call last):
  File "<my_application_code>", line 285, in <my_function>
    package.extractall(UPDATE_TEMP_PATH)
  File "/usr/lib/python3.8/site-packages/py7zr/py7zr.py", line 981, in extractall
    self._extract(path=path, return_dict=False, callback=callback)
  File "/usr/lib/python3.8/site-packages/py7zr/py7zr.py", line 622, in _extract
    self.worker.extract(
  File "/usr/lib/python3.8/site-packages/py7zr/py7zr.py", line 1247, in extract
    self.extract_single(
  File "/usr/lib/python3.8/site-packages/py7zr/py7zr.py", line 1316, in extract_single
    raise e
  File "/usr/lib/python3.8/site-packages/py7zr/py7zr.py", line 1313, in extract_single
    self._extract_single(fp, files, path, src_end, q, skip_notarget)
  File "/usr/lib/python3.8/site-packages/py7zr/py7zr.py", line 1385, in _extract_single
    raise CrcError(crc32, f.crc32, f.filename)
py7zr.exceptions.CrcError: (611537137, 3286897721, '2004.sh')

7za binary is able to extract this archive without problems.

I tested the same archive using py7zr on Python 3.10.12 (on the Ubuntu machine), and it's ok.

I can share the test data privately/by email.

Thanks - if I can give more information let me know

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more infoNeed more information or test data to reproduce

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions