Skip to content

Commit

Permalink
fix buffer overflow in mifar ul load (#1697)
Browse files Browse the repository at this point in the history
Co-authored-by: gornekich <n.gorbadey@gmail.com>
  • Loading branch information
2 people authored and hedger committed Sep 5, 2022
1 parent 2bae3f9 commit 40bc8be
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/nfc/nfc_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ bool nfc_device_load_mifare_ul_data(FlipperFormat* file, NfcDevice* dev) {
}
data->data_size = pages_total * 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;
for(uint16_t i = 0; i < pages_total; i++) {
string_printf(temp_str, "Page %d", i);
Expand Down

0 comments on commit 40bc8be

Please sign in to comment.