mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-19 08:29:58 +00:00
crypto: Use compressed sizes in offset calculation for KIP decompression
Fixes a fatal crash on start when deriving keys.
This commit is contained in:
parent
12401a0d87
commit
0aef2b9c26
1 changed files with 2 additions and 1 deletions
|
@ -516,7 +516,8 @@ void PartitionDataManager::DecryptPackage2(const std::array<Key128, 0x20>& packa
|
|||
out.insert(out.end(), rodata.begin(), rodata.end());
|
||||
out.insert(out.end(), data.begin(), data.end());
|
||||
|
||||
offset += sizeof(KIPHeader) + out.size();
|
||||
offset += sizeof(KIPHeader) + kip.sections[0].size_compressed +
|
||||
kip.sections[1].size_compressed + kip.sections[2].size_compressed;
|
||||
|
||||
if (name == "FS")
|
||||
package2_fs[static_cast<size_t>(type)] = std::move(out);
|
||||
|
|
Loading…
Reference in a new issue