oeyek / proxmark3

Automatically exported from code.google.com/p/proxmark3
GNU General Public License v2.0
0 stars 0 forks source link

small patch for em4x50read to prevent crash #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
below is a small patch to prevent em4x50read from crashing the gui when
called when no valid em4x50 trace data is loaded.

diff -u -N ../proxmark3-read-only/winsrc/command.cpp winsrc/command.cpp 
--- ../proxmark3-read-only/winsrc/command.cpp   2009-07-26 18:45:21.000000000
-0500
+++ winsrc/command.cpp  2009-07-26 18:47:38.000000000 -0500
@@ -331,7 +331,7 @@

    /* skip over the remainder of the LW */
    skip += tmpbuff[i+1]+tmpbuff[i+2];
-   while(GraphBuffer[skip] > low)
+   while(skip < MAX_GRAPH_TRACE_LEN && GraphBuffer[skip] > low)
        ++skip;
    skip += 8;

Original issue reported on code.google.com by ryan.def...@gmail.com on 26 Jul 2009 at 11:52

GoogleCodeExporter commented 8 years ago

Original comment by d18c...@gmail.com on 28 Jul 2009 at 1:45