Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

obscpio containing zip file raises BadZipFile exception #87

Open
StefanBruens opened this issue Jan 1, 2024 · 0 comments
Open

obscpio containing zip file raises BadZipFile exception #87

StefanBruens opened this issue Jan 1, 2024 · 0 comments

Comments

@StefanBruens
Copy link

The zipfile.is_zipfile unfortunately misclassifies any file which has a zipfile end-of-central-directory header in its last 65kByte as a zipfile:

python/cpython#72680

This is often the case when one of the last files in the obscpio archive is a zip file, or any other file which contains a zip file.

The check should probably ignore any python exceptions, or at least also BadZipFile:

except OSError:
# is_zipfile has often false positives and module is
# crashing on processing
pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant