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

Libzim fails to check embeded zim file. #812

Open
mgautierfr opened this issue Jun 21, 2023 · 4 comments
Open

Libzim fails to check embeded zim file. #812

mgautierfr opened this issue Jun 21, 2023 · 4 comments
Assignees
Labels
Milestone

Comments

@mgautierfr
Copy link
Collaborator

Zim file can be embedded in another file. We can open such a zim file with the fd Archive constructor

However, calling check on the such archive fails.
This probably comes from the verify implementation (https://github.com/openzim/libzim/blob/main/src/fileimpl.cpp#L563-L604) which don't care of the initial offset in the fd.

@kelson42 kelson42 added the bug label Jun 21, 2023
@kelson42 kelson42 added this to the 8.3.0 milestone Jun 21, 2023
@Jaifroid
Copy link

Sounds like ZIMception... (sorry, couldn't resit that 😉). Seriously, though, is this a realistic scenario (ZIM inside ZIM) that I need to be aware of and handle in the Kiwix JS backend?

@kelson42
Copy link
Contributor

@Jaifroid This is a scenario for custom apps utltimatively (ZIM file part of the Android app resource file). Not aware about an other one and actually wonder how @mgautierfr came to detect that bug.

@mgautierfr
Copy link
Collaborator Author

actually wonder how @mgautierfr came to detect that bug.

When working on the java wrapping and wanted to check with a embedded zim file.
See : https://github.com/kiwix/java-libkiwix/blob/main/lib/src/test/test.java#L238-L239

@Jaifroid
Copy link

@Jaifroid This is a scenario for custom apps ultimately (ZIM file part of the Android app resource file). Not aware about an other one and actually wonder how @mgautierfr came to detect that bug.

Ah, OK, thanks.

@kelson42 kelson42 modified the milestones: 9.0.0, 9.1.0 Sep 26, 2023
@kelson42 kelson42 pinned this issue Oct 8, 2023
@kelson42 kelson42 modified the milestones: 9.1.0, 10.0.0 Nov 1, 2023
@kelson42 kelson42 modified the milestones: 10.0.0, 9.3.0 Apr 13, 2024
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

3 participants