From 27f59413950350f285ecc45c3c03b9f0ae30ffa2 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 4 Oct 2024 09:18:39 +0200 Subject: [PATCH] add waiting time out for hf mfp info --- client/src/cmdhfmfp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/cmdhfmfp.c b/client/src/cmdhfmfp.c index 11f1ce899..0879b89e8 100644 --- a/client/src/cmdhfmfp.c +++ b/client/src/cmdhfmfp.c @@ -317,7 +317,11 @@ static int CmdHFMFPInfo(const char *Cmd) { // Mifare Plus info SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_CONNECT, 0, 0, NULL, 0); PacketResponseNG resp; - WaitForResponse(CMD_ACK, &resp); + if (WaitForResponseTimeout(CMD_ACK, &resp, 2000) == false) { + PrintAndLogEx(DEBUG, "iso14443a card select timeout"); + DropField(); + return false; + } iso14a_card_select_t card; memcpy(&card, (iso14a_card_select_t *)resp.data.asBytes, sizeof(iso14a_card_select_t));