From: Martin Holst Swende Date: Wed, 8 Apr 2015 11:31:04 +0000 (+0200) Subject: Fixed buffer initialization errors, as reported in http://www.proxmark.org/forum... X-Git-Tag: v2.1.0~18 X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/83602affe5ae7fd7fdc1b91722599c2450285929 Fixed buffer initialization errors, as reported in http://www.proxmark.org/forum/viewtopic.php?pid=15337#p15337 --- 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];