mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-25 06:13:14 +03:00
fix buffer overflow in mifar ul load (#1697)
Co-authored-by: gornekich <n.gorbadey@gmail.com>
This commit is contained in:
parent
97b27261d5
commit
8d8481b17f
@ -195,6 +195,7 @@ bool nfc_device_load_mifare_ul_data(FlipperFormat* file, NfcDevice* dev) {
|
|||||||
}
|
}
|
||||||
data->data_size = pages_total * 4;
|
data->data_size = pages_total * 4;
|
||||||
data->data_read = pages_read * 4;
|
data->data_read = pages_read * 4;
|
||||||
|
if(data->data_size > MF_UL_MAX_DUMP_SIZE || data->data_read > MF_UL_MAX_DUMP_SIZE) break;
|
||||||
bool pages_parsed = true;
|
bool pages_parsed = true;
|
||||||
for(uint16_t i = 0; i < pages_total; i++) {
|
for(uint16_t i = 0; i < pages_total; i++) {
|
||||||
string_printf(temp_str, "Page %d", i);
|
string_printf(temp_str, "Page %d", i);
|
||||||
|
Loading…
Reference in New Issue
Block a user