From a0ec56cdc4790128c8cde2db88229bc1763cc27b Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Mon, 12 Jul 2021 11:15:50 +0300 Subject: [PATCH 1/5] 350557 --- client/src/cmdhfmfdes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index 679619d10..35ab81d60 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -5504,7 +5504,7 @@ static int CmdHF14ADesGetAppNames(const char *Cmd) { if (buflen > 0) { PrintAndLogEx(INFO, "----------------------- " _CYAN_("File list") " -----------------------"); for (int i = 0; i < buflen; i++) - PrintAndLogEx(INFO, "AID: %06x ISO file id: %02x%02x ISO DF name[%" PRIu32 "]: %s", + PrintAndLogEx(INFO, "AID: %06x ISO file id: %02x%02x ISO DF name[%zu]: %s", DesfireAIDByteToUint(&buf[i * 24 + 1]), buf[i * 24 + 1 + 3], buf[i * 24 + 1 + 4], strlen((char *)&buf[i * 24 + 1 + 5]), From a3acb921c77f0ae60fb6cbd47e6aed26b22137a2 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Mon, 12 Jul 2021 11:18:55 +0300 Subject: [PATCH 2/5] 350563 --- client/src/mifare/desfirecore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/mifare/desfirecore.c b/client/src/mifare/desfirecore.c index 26c21494f..ddcc513eb 100644 --- a/client/src/mifare/desfirecore.c +++ b/client/src/mifare/desfirecore.c @@ -225,7 +225,7 @@ void DesfirePrintContext(DesfireContext *ctx) { sprint_hex(ctx->sessionKeyMAC, desfire_get_key_length(ctx->keyType))); PrintAndLogEx(INFO, " ENC: %s", sprint_hex(ctx->sessionKeyEnc, desfire_get_key_length(ctx->keyType))); - PrintAndLogEx(INFO, " IV [%d]: %s", + PrintAndLogEx(INFO, " IV [%zu]: %s", desfire_get_key_block_length(ctx->keyType), sprint_hex(ctx->IV, desfire_get_key_block_length(ctx->keyType))); From 7cb089f11bfbe58587b30d2768b06748bfb91269 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Mon, 12 Jul 2021 11:19:48 +0300 Subject: [PATCH 3/5] 350861 --- client/src/mifare/desfirecrypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/mifare/desfirecrypto.c b/client/src/mifare/desfirecrypto.c index d3955f92d..11b29b9db 100644 --- a/client/src/mifare/desfirecrypto.c +++ b/client/src/mifare/desfirecrypto.c @@ -118,7 +118,7 @@ size_t DesfireSearchCRCPos(uint8_t *data, size_t datalen, uint8_t respcode, uint break; crcpos++; // crc may be 0x00000000 or 0x0000 if (crcpos < crclen) { - PrintAndLogEx(WARNING, "No space for crc. pos: %d", crcpos); + PrintAndLogEx(WARNING, "No space for crc. pos: %zu", crcpos); return 0; } From 72ef378cd150e39a43b5836ea91389efbe155d9f Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Mon, 12 Jul 2021 11:20:50 +0300 Subject: [PATCH 4/5] 350888 --- client/src/cmdhfmfdes.c | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index 35ab81d60..2cec9fd90 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -5205,6 +5205,7 @@ static int CmdHF14ADesChKeySettings(const char *Cmd) { return PM3_ESOFT; if (res == 2) { PrintAndLogEx(ERR, "Key settings must have 1 byte length"); + CLIParserFree(ctx); return PM3_EINVARG; } From 2d5cc6aec7c9eee5e227fcd853a64b956a686539 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Mon, 12 Jul 2021 11:21:48 +0300 Subject: [PATCH 5/5] 350889 --- client/src/cmdhfmfdes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index 2cec9fd90..440cab4c1 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -5326,7 +5326,7 @@ static int CmdHF14ADesGetKeySettings(const char *Cmd) { } if (verbose) - PrintAndLogEx(INFO, "DesfireGetKeySettings[%d]: %s", buflen, sprint_hex(buf, buflen)); + PrintAndLogEx(INFO, "DesfireGetKeySettings[%zu]: %s", buflen, sprint_hex(buf, buflen)); if (buflen < 2) { PrintAndLogEx(ERR, "Command DesfireGetKeySettings returned wrong length: %d", buflen);