diff options
| author | 2018-10-19 18:39:00 -0400 | |
|---|---|---|
| committer | 2018-10-19 18:39:00 -0400 | |
| commit | c91be25b93bd7bfa7e074abf7cf5ad1b6b0850ab (patch) | |
| tree | 25fa10971f64d8e18a5c712e22789aefab6bb26e | |
| parent | Merge pull request #1525 from ogniK5377/block-home (diff) | |
| parent | crypto: Use compressed sizes in offset calculation for KIP decompression (diff) | |
| download | yuzu-c91be25b93bd7bfa7e074abf7cf5ad1b6b0850ab.tar.gz yuzu-c91be25b93bd7bfa7e074abf7cf5ad1b6b0850ab.tar.xz yuzu-c91be25b93bd7bfa7e074abf7cf5ad1b6b0850ab.zip | |
Merge pull request #1529 from DarkLordZach/key-derivation-crash
crypto: Use compressed sizes in offset calculation for KIP decompression
| -rw-r--r-- | src/core/crypto/partition_data_manager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/crypto/partition_data_manager.cpp b/src/core/crypto/partition_data_manager.cpp index 25cee1f3a..ed0775444 100644 --- a/src/core/crypto/partition_data_manager.cpp +++ b/src/core/crypto/partition_data_manager.cpp | |||
| @@ -516,7 +516,8 @@ void PartitionDataManager::DecryptPackage2(const std::array<Key128, 0x20>& packa | |||
| 516 | out.insert(out.end(), rodata.begin(), rodata.end()); | 516 | out.insert(out.end(), rodata.begin(), rodata.end()); |
| 517 | out.insert(out.end(), data.begin(), data.end()); | 517 | out.insert(out.end(), data.begin(), data.end()); |
| 518 | 518 | ||
| 519 | offset += sizeof(KIPHeader) + out.size(); | 519 | offset += sizeof(KIPHeader) + kip.sections[0].size_compressed + |
| 520 | kip.sections[1].size_compressed + kip.sections[2].size_compressed; | ||
| 520 | 521 | ||
| 521 | if (name == "FS") | 522 | if (name == "FS") |
| 522 | package2_fs[static_cast<size_t>(type)] = std::move(out); | 523 | package2_fs[static_cast<size_t>(type)] = std::move(out); |