fix 'lf em 4x50_read - now checks if have enough data in Graphbuffer

This commit is contained in:
iceman1001 2019-09-19 13:12:48 +02:00
parent aa2f80795d
commit a3161ae9a2

View file

@ -821,6 +821,12 @@ int EM4x50Read(const char *Cmd, bool verbose) {
uint8_t bits[MAX_GRAPH_TRACE_LEN] = {0};
size_t size = getFromGraphBuf(bits);
if (size < 4000) {
if (verbose || g_debugMode) PrintAndLogEx(ERR, "Error: EM4x50 - Too little data in Graphbuffer");
return PM3_ESOFT;
}
computeSignalProperties(bits, size);
signal_t *sp = getSignalProperties();