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

is_zip function might be incorrect #49

Closed
sigmaSd opened this issue Nov 10, 2021 · 0 comments
Closed

is_zip function might be incorrect #49

sigmaSd opened this issue Nov 10, 2021 · 0 comments

Comments

@sigmaSd
Copy link

sigmaSd commented Nov 10, 2021

The signature here https://en.wikipedia.org/wiki/List_of_file_signatures is a bit different

code:

fn is_zip(buf: &[u8]) -> bool {
        buf.len() >= 3
            && buf[..=1] == [0x50, 0x4B]
            && (buf[2..=3] == [0x3, 0x4] || buf[2..=3] == [0x5, 0x6] || buf[2..=3] == [0x7, 0x8])
}
bojand added a commit that referenced this issue Jul 2, 2022
add support for winzip in is_zip. fixes #52 and possibly #49
@bojand bojand closed this as completed Jul 2, 2022
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

2 participants