mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 04:50:12 -07:00
fix: 'reveng -g' stack crash by too small array
This commit is contained in:
parent
e95313cc22
commit
1ab498001e
1 changed files with 4 additions and 2 deletions
|
@ -400,9 +400,11 @@ int CmdrevengSearch(const char *Cmd){
|
||||||
int dataLen = param_getstr(Cmd, 0, inHexStr, sizeof(inHexStr));
|
int dataLen = param_getstr(Cmd, 0, inHexStr, sizeof(inHexStr));
|
||||||
if (dataLen < 4) return 0;
|
if (dataLen < 4) return 0;
|
||||||
|
|
||||||
|
// these two arrays, must match preset size.
|
||||||
char *Models[102];
|
char *Models[102];
|
||||||
|
uint8_t width[102] = {0};
|
||||||
int count = 0;
|
int count = 0;
|
||||||
uint8_t width[80] = {0};
|
|
||||||
uint8_t crcChars = 0;
|
uint8_t crcChars = 0;
|
||||||
char result[30];
|
char result[30];
|
||||||
char revResult[30];
|
char revResult[30];
|
||||||
|
@ -477,4 +479,4 @@ int CmdrevengSearch(const char *Cmd){
|
||||||
|
|
||||||
if (!found) PrintAndLog("\nNo matches found\n");
|
if (!found) PrintAndLog("\nNo matches found\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue