From 83602affe5ae7fd7fdc1b91722599c2450285929 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Wed, 8 Apr 2015 13:31:04 +0200 Subject: [PATCH] Fixed buffer initialization errors, as reported in http://www.proxmark.org/forum/viewtopic.php?pid=15337#p15337 --- armsrc/iclass.c | 3 ++- client/cmdhfmf.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/armsrc/iclass.c b/armsrc/iclass.c index 7b4daa36..56bc29db 100644 --- a/armsrc/iclass.c +++ b/armsrc/iclass.c @@ -1675,7 +1675,8 @@ uint8_t handshakeIclassTag(uint8_t *card_data) // Reader iClass Anticollission void ReaderIClass(uint8_t arg0) { - uint8_t card_data[6 * 8]={0xFF}; + uint8_t card_data[6 * 8]={0}; + memset(card_data, 0xFF, sizeof(card_data)); uint8_t last_csn[8]={0}; //Read conf block CRC(0x01) => 0xfa 0x22 diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 468243fc..5f2e8dec 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -434,7 +434,7 @@ int CmdHF14AMfRestore(const char *Cmd) { uint8_t sectorNo,blockNo; uint8_t keyType = 0; - uint8_t key[6] = {0xFF}; + uint8_t key[6] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; uint8_t bldata[16] = {0x00}; uint8_t keyA[40][6]; uint8_t keyB[40][6]; -- 2.39.5