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

DiscIO/DirectoryBlob: Handle reads between files. #10099

Merged

Conversation

AdmiralCurtiss
Copy link
Contributor

@AdmiralCurtiss AdmiralCurtiss commented Sep 14, 2021

If someone passes an offset past the end of a file but before the start of another file to DiscContentContainer::Read(), the PadToAddress() call completely fills the buffer with zeroes and reduces the length to 0, but the code flow then tries to call it->Read() anyway, triggering a debug assert about an out-of-bounds offset.

To easily observe this just launch an extracted game in a Debug build, the read from VolumeDisc::IsNKit() is between files in our built disc layout.

@leoetlino leoetlino merged commit 94cfbfc into dolphin-emu:master Sep 15, 2021
11 checks passed
@AdmiralCurtiss AdmiralCurtiss deleted the directoryblob-read-between-files branch September 15, 2021 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants