]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmf.c
small fix in auth (#693)
[proxmark3-svn] / client / cmdhfmf.c
index 028bbf7a3aca5c35ff2b069f6f0b96ebc6a70e0d..5efb4a41c3a030ee2b775138992048c9d767b8ad 100644 (file)
@@ -2712,6 +2712,7 @@ int CmdHF14AMfAuth4(const char *cmd) {
        int res = ExchangeRAW14a(cmd1, sizeof(cmd1), true, true, data, sizeof(data), &datalen);\r
        if (res) {\r
                PrintAndLog("ERROR exchande raw error: %d", res);\r
+               DropField();\r
                return 2;\r
        }\r
        \r
@@ -2719,21 +2720,25 @@ int CmdHF14AMfAuth4(const char *cmd) {
                \r
        if (datalen < 3) {\r
                PrintAndLog("ERROR: card response length: %d", datalen);\r
+               DropField();\r
                return 3;\r
        }\r
        \r
        if (data[0] != 0x0a || data[1] != 0x00) {\r
                PrintAndLog("ERROR: card response. Framing error. :%s", sprint_hex(data, 2));\r
+               DropField();\r
                return 3;\r
        }\r
 \r
        if (data[2] != 0x90) {\r
                PrintAndLog("ERROR: card response error: %02x", data[2]);\r
+               DropField();\r
                return 3;\r
        }\r
 \r
        if (datalen != 19) {\r
                PrintAndLog("ERROR: card response must be 16 bytes long instead of: %d", datalen);\r
+               DropField();\r
                return 3;\r
        }\r
        \r
Impressum, Datenschutz