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

Two small fixes #310

Merged
merged 2 commits into from
Jun 10, 2024
Merged

Two small fixes #310

merged 2 commits into from
Jun 10, 2024

Conversation

LemonBoy
Copy link
Contributor

The first commit fixes a silly oversight in the freshly-added code, the fuzzer found the problem in no time.

The second commit is slightly different as it prevents the user error to some degree, the mz_zip_mem_read_func function doesn't use the m_file_archive_start_ofs field and am not sure if it should. So this commit prevents the new machinery from changing the offset/size of the archive, if you feel the problem should be solved in another way (e.g. taking m_file_archive_start_ofs into account) I'll amend the PR asap.

Ensure the archive start offset can never be negative.
Fixes a case found by OSSFuzz.
It makes sense to avoid changing the offset and/or the archive size when
the user specifies a buffer rather than a file.
@uroni uroni merged commit 8573fd7 into richgel999:master Jun 10, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants