From 77c801da3350b32a0733e2408791c909457eb80d Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Sat, 21 Aug 2021 16:21:13 +0300 Subject: [PATCH 1/2] 354821 --- 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 f63025fa7..a1e1cdd47 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -5067,7 +5067,7 @@ static int CmdHF14ADesWriteData(const char *Cmd) { if (trkeylen > 0) { uint8_t prevReaderID[CRYPTO_AES_BLOCK_SIZE] = {0}; DesfireDecodePrevReaderID(&dctx, trkey, transactionCounter, resp, prevReaderID); - PrintAndLogEx(INFO, "Prev reader id: %s", resplen, sprint_hex(prevReaderID, CRYPTO_AES_BLOCK_SIZE)); + PrintAndLogEx(INFO, "Prev reader id: %s", sprint_hex(prevReaderID, CRYPTO_AES_BLOCK_SIZE)); } readeridpushed = true; From f645d053b9c76eba4c349167c25d9bb2a816c559 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Sat, 21 Aug 2021 16:22:51 +0300 Subject: [PATCH 2/2] 355638 --- 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 4342e8ee1..f3c332213 100644 --- a/client/src/mifare/desfirecrypto.c +++ b/client/src/mifare/desfirecrypto.c @@ -689,7 +689,7 @@ void DesfireGenTransSessionKeyLRP(uint8_t *key, uint32_t trCntr, uint8_t *uid, b void DesfireDecodePrevReaderID(DesfireContext *ctx, uint8_t *key, uint32_t trCntr, uint8_t *encPrevReaderID, uint8_t *prevReaderID) { uint8_t sessionkey[16] = {0}; - uint8_t uid[7] = {0}; + uint8_t uid[12] = {0}; memcpy(uid, ctx->uid, MAX(ctx->uidlen, 7)); if (ctx->secureChannel == DACEV2) {