]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfem4x.c
Some more nasty bugs fixed in the lf t55xx manchester_decode method.
[proxmark3-svn] / client / cmdlfem4x.c
index 0449e34ab4333c88ba02bb7c730091060ebeaaf7..1ce937d97e58350508d28c5b90dd46ef5ceac260 100644 (file)
@@ -22,6 +22,7 @@
 #include "util.h"
 #include "data.h"
 #define LF_TRACE_BUFF_SIZE 12000
+#define LF_BITSSTREAM_LEN 1000
 
 char *global_em410xId;
 
@@ -530,9 +531,9 @@ int CmdReadWord(const char *Cmd)
        }
        GraphTraceLen = LF_TRACE_BUFF_SIZE;
        
-       uint8_t bits[1000] = {0x00};
+       uint8_t bits[LF_BITSSTREAM_LEN] = {0x00};
        uint8_t * bitstream = bits;
-       manchester_decode(GraphBuffer, LF_TRACE_BUFF_SIZE, bitstream);
+       manchester_decode(GraphBuffer, LF_TRACE_BUFF_SIZE, bitstream,LF_BITSSTREAM_LEN);
        RepaintGraphWindow();
   return 0;
 }
@@ -570,10 +571,9 @@ int CmdReadWordPWD(const char *Cmd)
        }
        GraphTraceLen = LF_TRACE_BUFF_SIZE;
        
-       uint8_t bits[1000] = {0x00};
-       uint8_t * bitstream = bits;
-       
-       manchester_decode(GraphBuffer, LF_TRACE_BUFF_SIZE, bitstream);
+       uint8_t bits[LF_BITSSTREAM_LEN] = {0x00};
+       uint8_t * bitstream = bits;     
+       manchester_decode(GraphBuffer, LF_TRACE_BUFF_SIZE, bitstream, LF_BITSSTREAM_LEN);
        RepaintGraphWindow();
   return 0;
 }
Impressum, Datenschutz