]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/mifarecmd.c
Fixed another issue where a buffer was filled with 0x44, affecting chinese cards...
[proxmark3-svn] / armsrc / mifarecmd.c
index 6ca9e4e953fa407a00b0177282cdd60a30ef0b4f..62e5188b3465bef68871175ab5bf85aabc065725 100644 (file)
@@ -82,7 +82,7 @@ void MifareReadBlock(uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain)
 //     memcpy(ack.d.asBytes, dataoutbuf, 16);\r
        \r
        LED_B_ON();\r
-  cmd_send(CMD_ACK,isOK,0,0,0,0);\r
+  cmd_send(CMD_ACK,isOK,0,0,dataoutbuf,16);\r
 //     UsbSendPacket((uint8_t *)&ack, sizeof(UsbCommand));\r
        LED_B_OFF();\r
 \r
@@ -954,9 +954,13 @@ void MifareCGetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai
 //     if (isOK) memcpy(ack.d.asBytes, data, 18);\r
        \r
        // add trace trailer\r
-       memset(data, 0x44, 4);\r
-       LogTrace(data, 4, 0, 0, TRUE);\r
-\r
+       /*\r
+       * Removed by Martin, this piece of overwrites the 'data' variable \r
+       * which is sent two lines down, and is obviously not correct. \r
+       * \r
+       * memset(data, 0x44, 4);\r
+       * LogTrace(data, 4, 0, 0, TRUE);\r
+       */\r
        LED_B_ON();\r
   cmd_send(CMD_ACK,isOK,0,0,data,18);\r
 //     UsbSendPacket((uint8_t *)&ack, sizeof(UsbCommand));\r
Impressum, Datenschutz