mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-24 07:40:26 +01:00
Fix user_generate_specific_aes_key wrong register use
This commit is contained in:
parent
4f0e8b8467
commit
54fac349f2
@ -280,14 +280,19 @@ uint32_t user_generate_specific_aes_key(smc_args_t *args) {
|
||||
|
||||
wrapped_key[0] = args->X[1];
|
||||
wrapped_key[1] = args->X[2];
|
||||
if (args->X[4] > MASTERKEY_REVISION_MAX) {
|
||||
|
||||
master_key_rev = args->X[3];
|
||||
if (mkey_get_revision() < MASTERKEY_REVISION_400_CURRENT) {
|
||||
master_key_rev &= MASK(32);
|
||||
}
|
||||
if (master_key_rev > MASTERKEY_REVISION_MAX) {
|
||||
return 2;
|
||||
}
|
||||
master_key_rev = (unsigned int)(args->X[4]);
|
||||
if (args->X[3] > 1) {
|
||||
|
||||
if (args->X[4] > 1) {
|
||||
return 2;
|
||||
}
|
||||
should_mask = args->X[3] != 0;
|
||||
should_mask = args->X[4] != 0;
|
||||
|
||||
unsigned int keyslot;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user