diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index 679619d10..440cab4c1 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; } @@ -5325,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); @@ -5504,7 +5505,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]), 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))); 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; }