Fixed picopass load save file overrun (#2464)
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
parent
c0e0403b44
commit
9dd1fb64b7
@ -167,6 +167,8 @@ static bool picopass_device_load_data(PicopassDevice* dev, FuriString* path, boo
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t app_limit = AA1[PICOPASS_CONFIG_BLOCK_INDEX].data[0];
|
size_t app_limit = AA1[PICOPASS_CONFIG_BLOCK_INDEX].data[0];
|
||||||
|
// Fix for unpersonalized cards that have app_limit set to 0xFF
|
||||||
|
if(app_limit > PICOPASS_MAX_APP_LIMIT) app_limit = PICOPASS_MAX_APP_LIMIT;
|
||||||
for(size_t i = 6; i < app_limit; i++) {
|
for(size_t i = 6; i < app_limit; i++) {
|
||||||
furi_string_printf(temp_str, "Block %d", i);
|
furi_string_printf(temp_str, "Block %d", i);
|
||||||
if(!flipper_format_read_hex(
|
if(!flipper_format_read_hex(
|
||||||
|
Loading…
Reference in New Issue
Block a user