1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-13 05:19:50 +04:00

NFC: Fix key invalidation logic (#2782)

* NFC: Fix key invalidation logic
* NFC: Fix crash in CLI with empty response
* Fix incorrect key conversions
* Proper call to nfc_util

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: Astra <me@astrra.space>
This commit is contained in:
AloneLiberty
2023-06-29 11:24:13 +03:00
committed by GitHub
parent c10c45616d
commit e5ae3e22b3
2 changed files with 13 additions and 9 deletions

View File

@@ -144,6 +144,10 @@ static void nfc_cli_apdu(Cli* cli, FuriString* args) {
break;
}
resp_size = (tx_rx.rx_bits / 8) * 2;
if(!resp_size) {
printf("No response\r\n");
break;
}
resp_buffer = malloc(resp_size);
uint8_to_hex_chars(tx_rx.rx_data, resp_buffer, resp_size);
resp_buffer[resp_size] = 0;