Browse Source
Merge pull request #1529 from DarkLordZach/key-derivation-crash
crypto: Use compressed sizes in offset calculation for KIP decompression
pull/15/merge
Mat M
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
src/core/crypto/partition_data_manager.cpp
|
|
@ -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(), rodata.begin(), rodata.end()); |
|
|
out.insert(out.end(), data.begin(), data.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") |
|
|
if (name == "FS") |
|
|
package2_fs[static_cast<size_t>(type)] = std::move(out); |
|
|
package2_fs[static_cast<size_t>(type)] = std::move(out); |
|
|
|