NFC: fix memory corruption in nfc_worker_read_mifare_desfire (#1156)
* NFC: fix memory corruption in nfc_worker_read_mifare_desfire * NFC: if the NFC tag doesn't have apps or files, don't try to save them. * NFC: make-format Co-authored-by: Jack Doan <jackdoan@rivian.com> Co-authored-by: Skorpionm <85568270+Skorpionm@users.noreply.github.com> Co-authored-by: Nikolay Minaylov <nm29719@gmail.com> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -540,6 +540,7 @@ void nfc_worker_read_mifare_desfire(NfcWorker* nfc_worker) {
|
||||
FURI_LOG_W(TAG, "Bad DESFire GET_KEY_SETTINGS response");
|
||||
free(data->master_key_settings);
|
||||
data->master_key_settings = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
MifareDesfireKeyVersion** key_version_head =
|
||||
@@ -593,6 +594,7 @@ void nfc_worker_read_mifare_desfire(NfcWorker* nfc_worker) {
|
||||
FURI_LOG_W(TAG, "Bad DESFire GET_KEY_SETTINGS response");
|
||||
free(app->key_settings);
|
||||
app->key_settings = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
MifareDesfireKeyVersion** key_version_head = &app->key_settings->key_version_head;
|
||||
|
Reference in New Issue
Block a user