mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-07 00:28:07 +08:00
Fix issue 14: mandemod and lf em4x em410xread crashes the proxmark3 client app
This fix is quick-and-dirty since it only reduces the amount of stackspace allocated by changing the data type of the array to uint8_t instead of the 32 bit integers. The reduced number of bits is OK since only (at most) 2 of the available bits are used in each element. At least array bit utilization is improved from 6.66% to 25% :) Large structures such as these should probably be malloc()ed.
This commit is contained in:
parent
33bf54cf3d
commit
15cdabd474
2 changed files with 2 additions and 2 deletions
|
@ -561,7 +561,7 @@ int CmdManchesterDemod(const char *Cmd)
|
|||
|
||||
/* But it does not work if compiling on WIndows: therefore we just allocate a */
|
||||
/* large array */
|
||||
int BitStream[MAX_GRAPH_TRACE_LEN];
|
||||
uint8_t BitStream[MAX_GRAPH_TRACE_LEN];
|
||||
|
||||
/* Detect high and lows */
|
||||
for (i = 0; i < GraphTraceLen; i++)
|
||||
|
|
|
@ -34,7 +34,7 @@ int CmdEM410xRead(const char *Cmd)
|
|||
int parity[4];
|
||||
char id[11];
|
||||
int retested = 0;
|
||||
int BitStream[MAX_GRAPH_TRACE_LEN];
|
||||
uint8_t BitStream[MAX_GRAPH_TRACE_LEN];
|
||||
high = low = 0;
|
||||
|
||||
/* Detect high and lows and clock */
|
||||
|
|
Loading…
Reference in a new issue