mirror of
https://github.com/GaryOderNichts/WiiUIdent.git
synced 2024-12-04 13:54:21 +01:00
SubmitScreen.cpp: Zero an unused OTP area before hashing.
This should normally be zero anyway, but zero it again just in case.
This commit is contained in:
parent
a6efca8a74
commit
6d5b19a8a6
@ -174,7 +174,7 @@ size_t SubmitScreen::CurlWriteCallback(void* contents, size_t size, size_t nmemb
|
|||||||
|
|
||||||
void SubmitScreen::SubmitSystemData()
|
void SubmitScreen::SubmitSystemData()
|
||||||
{
|
{
|
||||||
const auto& otp = OTP::Get();
|
auto otp = OTP::Get();
|
||||||
const auto& seeprom = SEEPROM::Get();
|
const auto& seeprom = SEEPROM::Get();
|
||||||
WUT_ALIGNAS(0x40) MCPSysProdSettings sysProd{};
|
WUT_ALIGNAS(0x40) MCPSysProdSettings sysProd{};
|
||||||
int32_t mcpHandle = MCP_Open();
|
int32_t mcpHandle = MCP_Open();
|
||||||
@ -259,6 +259,7 @@ void SubmitScreen::SubmitSystemData()
|
|||||||
// is fully contained within the MLC CID.
|
// is fully contained within the MLC CID.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(&otp.miscBank, 0, 0x40);
|
||||||
if (Utils::SHA256(&otp, sizeof(otp), pd->otp_sha256, sizeof(pd->otp_sha256)) != 0) {
|
if (Utils::SHA256(&otp, sizeof(otp), pd->otp_sha256, sizeof(pd->otp_sha256)) != 0) {
|
||||||
error = "Failed to hash otp data";
|
error = "Failed to hash otp data";
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user