mirror of
https://github.com/shchmue/Lockpick_RCM.git
synced 2024-11-16 07:19:19 +01:00
Validate pkg1_identify result for main menu
This commit is contained in:
parent
b3f6e055b2
commit
20c0df3715
@ -304,6 +304,7 @@ void _get_key_generations(char *sysnand_label, char *emunand_label)
|
|||||||
|
|
||||||
u32 pk1_offset = h_cfg.t210b01 ? sizeof(bl_hdr_t210b01_t) : 0; // Skip T210B01 OEM header.
|
u32 pk1_offset = h_cfg.t210b01 ? sizeof(bl_hdr_t210b01_t) : 0; // Skip T210B01 OEM header.
|
||||||
const pkg1_id_t *pkg1_id = pkg1_identify(pkg1 + pk1_offset);
|
const pkg1_id_t *pkg1_id = pkg1_identify(pkg1 + pk1_offset);
|
||||||
|
if (pkg1_id) {
|
||||||
sprintf(sysnand_label + 36, "% 3d", pkg1_id->kb);
|
sprintf(sysnand_label + 36, "% 3d", pkg1_id->kb);
|
||||||
ment_top[0].caption = sysnand_label;
|
ment_top[0].caption = sysnand_label;
|
||||||
if (h_cfg.emummc_force_disable)
|
if (h_cfg.emummc_force_disable)
|
||||||
@ -311,6 +312,7 @@ void _get_key_generations(char *sysnand_label, char *emunand_label)
|
|||||||
free(pkg1);
|
free(pkg1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
emummc_storage_init_mmc(&storage, &sdmmc);
|
emummc_storage_init_mmc(&storage, &sdmmc);
|
||||||
memset(pkg1, 0, PKG1_MAX_SIZE);
|
memset(pkg1, 0, PKG1_MAX_SIZE);
|
||||||
@ -319,10 +321,12 @@ void _get_key_generations(char *sysnand_label, char *emunand_label)
|
|||||||
emummc_storage_end(&storage);
|
emummc_storage_end(&storage);
|
||||||
|
|
||||||
pkg1_id = pkg1_identify(pkg1 + pk1_offset);
|
pkg1_id = pkg1_identify(pkg1 + pk1_offset);
|
||||||
|
if (pkg1_id) {
|
||||||
sprintf(emunand_label + 36, "% 3d", pkg1_id->kb);
|
sprintf(emunand_label + 36, "% 3d", pkg1_id->kb);
|
||||||
free(pkg1);
|
free(pkg1);
|
||||||
ment_top[1].caption = emunand_label;
|
ment_top[1].caption = emunand_label;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
extern void pivot_stack(u32 stack_top);
|
extern void pivot_stack(u32 stack_top);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user