From: Oleg Moiseenko Date: Thu, 11 Oct 2018 17:28:29 +0000 (+0300) Subject: small fix in auth (#693) X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/ae027818ace0f74d179a1f7656b5f044cf813ee7 small fix in auth (#693) --- diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 028bbf7a..5efb4a41 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -2712,6 +2712,7 @@ int CmdHF14AMfAuth4(const char *cmd) { int res = ExchangeRAW14a(cmd1, sizeof(cmd1), true, true, data, sizeof(data), &datalen); if (res) { PrintAndLog("ERROR exchande raw error: %d", res); + DropField(); return 2; } @@ -2719,21 +2720,25 @@ int CmdHF14AMfAuth4(const char *cmd) { if (datalen < 3) { PrintAndLog("ERROR: card response length: %d", datalen); + DropField(); return 3; } if (data[0] != 0x0a || data[1] != 0x00) { PrintAndLog("ERROR: card response. Framing error. :%s", sprint_hex(data, 2)); + DropField(); return 3; } if (data[2] != 0x90) { PrintAndLog("ERROR: card response error: %02x", data[2]); + DropField(); return 3; } if (datalen != 19) { PrintAndLog("ERROR: card response must be 16 bytes long instead of: %d", datalen); + DropField(); return 3; }