fix: 'reveng -g' stack crash by too small array

This commit is contained in:
iceman1001 2018-02-03 23:05:01 +01:00
parent e95313cc22
commit 1ab498001e

View file

@ -400,9 +400,11 @@ int CmdrevengSearch(const char *Cmd){
int dataLen = param_getstr(Cmd, 0, inHexStr, sizeof(inHexStr));
if (dataLen < 4) return 0;
// these two arrays, must match preset size.
char *Models[102];
uint8_t width[102] = {0};
int count = 0;
uint8_t width[80] = {0};
uint8_t crcChars = 0;
char result[30];
char revResult[30];