mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-18 08:22:04 +00:00
package2: Fix loop index in decrypt_and_validate_header (#31)
This commit is contained in:
parent
83216409d2
commit
7d777a0e59
1 changed files with 1 additions and 1 deletions
|
@ -301,7 +301,7 @@ uint32_t decrypt_and_validate_header(package2_header_t *header) {
|
||||||
uint32_t mkey_rev;
|
uint32_t mkey_rev;
|
||||||
|
|
||||||
/* Try to decrypt for all possible master keys. */
|
/* Try to decrypt for all possible master keys. */
|
||||||
for (mkey_rev = 0; i < MASTERKEY_REVISION_MAX; i++) {
|
for (mkey_rev = 0; mkey_rev < MASTERKEY_REVISION_MAX; mkey_rev++) {
|
||||||
package2_crypt_ctr(mkey_rev, &metadata, sizeof(package2_meta_t), &header->metadata, sizeof(package2_meta_t), header->metadata.ctr, sizeof(header->metadata.ctr));
|
package2_crypt_ctr(mkey_rev, &metadata, sizeof(package2_meta_t), &header->metadata, sizeof(package2_meta_t), header->metadata.ctr, sizeof(header->metadata.ctr));
|
||||||
/* Copy the ctr (which stores information) into the decrypted metadata. */
|
/* Copy the ctr (which stores information) into the decrypted metadata. */
|
||||||
memcpy(metadata.ctr, header->metadata.ctr, sizeof(header->metadata.ctr));
|
memcpy(metadata.ctr, header->metadata.ctr, sizeof(header->metadata.ctr));
|
||||||
|
|
Loading…
Reference in a new issue