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

The library does not notice a file is not in Zip format #45

Closed
aljaz0 opened this issue Sep 21, 2021 · 1 comment
Closed

The library does not notice a file is not in Zip format #45

aljaz0 opened this issue Sep 21, 2021 · 1 comment
Labels

Comments

@aljaz0
Copy link

aljaz0 commented Sep 21, 2021

Hey,
I noticed the library does not check the file stamp to determine if the filew passed in is a Zip file. I passed in a .Rar archive by mistake and it started parsing away and crashing eventually. I created a simple fix that checks for the ZIP filestamp (0x50,0x4b,0x03, 0x04) before parsing to avoid that. I hope I am notr missing anything ?

@jaime-olivares
Copy link
Owner

I don't think this is a correct assessment.
First thing done is to find the End of Centra Directory section, which obviously fails and intentionally throws an InvalidDataException.
I have tried it with a sample .rar file.

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

No branches or pull requests

2 participants