]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
Fixed buffer initialization errors, as reported in http://www.proxmark.org/forum...
authorMartin Holst Swende <martin@swende.se>
Wed, 8 Apr 2015 11:31:04 +0000 (13:31 +0200)
committerMartin Holst Swende <martin@swende.se>
Wed, 8 Apr 2015 11:31:04 +0000 (13:31 +0200)
armsrc/iclass.c
client/cmdhfmf.c

index 7b4daa36bb3b6541e5b77fffbceb84189639ce02..56bc29db5d760f4f631c51878635c486fe0d6de6 100644 (file)
@@ -1675,7 +1675,8 @@ uint8_t handshakeIclassTag(uint8_t *card_data)
 // Reader iClass Anticollission
 void ReaderIClass(uint8_t arg0) {
 
 // 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
     uint8_t last_csn[8]={0};
        
        //Read conf block CRC(0x01) => 0xfa 0x22
index 468243fc594ace7a2d74e3beb334d1956216a18c..5f2e8dec33bf1ccef336000204d1cf0d258c299c 100644 (file)
@@ -434,7 +434,7 @@ int CmdHF14AMfRestore(const char *Cmd)
 {\r
        uint8_t sectorNo,blockNo;\r
        uint8_t keyType = 0;\r
 {\r
        uint8_t sectorNo,blockNo;\r
        uint8_t keyType = 0;\r
-       uint8_t key[6] = {0xFF};\r
+       uint8_t key[6] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};\r
        uint8_t bldata[16] = {0x00};\r
        uint8_t keyA[40][6];\r
        uint8_t keyB[40][6];\r
        uint8_t bldata[16] = {0x00};\r
        uint8_t keyA[40][6];\r
        uint8_t keyB[40][6];\r
Impressum, Datenschutz