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 17:24:13 +09:00
committed by GitHub
co-authored by あく Astra
parent c10c45616d
commit e5ae3e22b3
2 changed files with 13 additions and 9 deletions
+4
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;