WiiSave: Fix out-of-bounds read

Fixes the count argument for WriteArray. (I used it like WriteBytes.)
Whoops.
This commit is contained in:
Léo Lam 2018-05-13 23:17:35 +02:00
parent 2be8c35d6d
commit 3fbfa4335e

View File

@ -468,7 +468,7 @@ void WiiSave::do_sig()
data_file.WriteArray(ap_sig.data(), ap_sig.size());
const u32 SIGNATURE_END_MAGIC = Common::swap32(0x2f536969);
data_file.WriteArray(&SIGNATURE_END_MAGIC, sizeof(SIGNATURE_END_MAGIC));
data_file.WriteArray(&SIGNATURE_END_MAGIC, 1);
const IOS::Certificate device_certificate = m_ios.GetIOSC().GetDeviceCertificate();
data_file.WriteArray(device_certificate.data(), device_certificate.size());
data_file.WriteArray(ap_cert.data(), ap_cert.size());