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

Do not assume urlPtrPos is just after mimeList when reading it #630

Conversation

Jaifroid
Copy link
Member

This PR is a fix for #628 and #629 (partially) and #621 . It restores the ability of the app to read the MIME type list in newer ZIMs which have relocated the urlPtrPos to the end of the archive. The same solution has been adopted in libZim - see openzim/libzim#353. The solution is to limit the maximum size of the slice being searched for the MIME type list to 1024 bytes. If the ZIM reports it as being less than that, then the lower value is accepted.

Copy link
Contributor

@mossroy mossroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks and congratulations @Jaifroid for finding and fixing this bug!
Great job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment