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

Boot: Check TMD validity before reading from TMD #5584

Merged
merged 1 commit into from Jun 9, 2017

Conversation

JosJuice
Copy link
Member

@JosJuice JosJuice commented Jun 9, 2017

Otherwise Dolphin crashes when trying to boot a Wii game with an invalid TMD.

Otherwise Dolphin crashes when trying to boot a Wii game
with an invalid TMD.
@leoetlino leoetlino merged commit d9e8a2a into dolphin-emu:master Jun 9, 2017
@JosJuice JosJuice deleted the boot-tmd-valid branch June 9, 2017 17:03
@shuffle2
Copy link
Contributor

shuffle2 commented Jun 9, 2017

What are such games? Does it just refuse to boot after this?

@JosJuice
Copy link
Member Author

JosJuice commented Jun 9, 2017

All retail releases have valid TMDs. Invalid TMDs are mostly a concern for VolumeDirectory/DirectoryBlob. Right now, they always have invalid TMDs. We currently workaround that by never calling EmulatedBS2_Wii for them (PR #5400), but we did have crashes here before that workaround was added. With the VolumeDirectory-to-DirectoryBlob redesign (PR #5573), it will be possible for the user to supply a valid TMD or not, and the workaround of never calling EmulatedBS2_Wii will be dropped.

Yes, it'll refuse to boot. More specifically, we end up here:

@shuffle2
Copy link
Contributor

shuffle2 commented Jun 9, 2017

So is booting dev signed stuff broken?

@JosJuice
Copy link
Member Author

JosJuice commented Jun 9, 2017

I'm not sure what dev-signed discs are like, and I can't check because I don't have any. I would assume they have TMDs, but that's just a guess.

@leoetlino
Copy link
Member

We don't really use anything from the TMD, other than to get the required IOS version, and the TMD is handled the same way on dev consoles as on retail consoles (as the IOSes are the same).

@shuffle2
Copy link
Contributor

shuffle2 commented Jun 9, 2017

So I guess IsValid is more like Exists?

@leoetlino
Copy link
Member

Sort of, IsValid() will return false if the TMD size isn't at least as large as the base TMD header + content entries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants