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

Make dumps of type CompleteMemoryDump trust TotalNumberOfPages header field instead of just MetadataSize #28

Merged
merged 5 commits into from
Mar 5, 2024

Conversation

hugsy
Copy link
Contributor

@hugsy hugsy commented Mar 4, 2024

This fixes #27

When parsing a DumpType_t::CompleteMemoryDump type of dump, it seems that the field MetadataSize field from the RdmpHeader can exceed the actual number of PfnRange class entries declared. Since we properly check bounds, it will result in a failure.

This PR adds a extra check only for CompleteMemoryDump to enforce a strict check of the current number of pages declared and stop parsing when the expected number of pages (declared in FullRdmpHeader.TotalNumberOfPages) is reached.

@hugsy hugsy changed the title Make dumps of type CompleteMemoryDump trust FullRdmpHeader.TotalNumberOfPages instead of just FullRdmpHeader.Hdr.MetadataSize Make dumps of type CompleteMemoryDump trust TotalNumberOfPages header field instead of just MetadataSize Mar 4, 2024
@0vercl0k 0vercl0k merged commit 87f9668 into 0vercl0k:master Mar 5, 2024
32 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.

Bug when building physmap for CompleteMemoryDump dump
2 participants