mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-05 23:52:27 +08:00
fix: data mtrim - no crashing
This commit is contained in:
parent
dd970ea562
commit
12b3a7c236
1 changed files with 2 additions and 1 deletions
|
@ -1825,7 +1825,8 @@ static int CmdMtrim(const char *Cmd) {
|
|||
uint32_t start = 0, stop = 0;
|
||||
sscanf(Cmd, "%u %u", &start, &stop);
|
||||
|
||||
if (start > GraphTraceLen || stop > GraphTraceLen || start > stop) return PM3_ESOFT;
|
||||
if (start > GraphTraceLen || stop > GraphTraceLen || start >= stop)
|
||||
return PM3_ESOFT;
|
||||
|
||||
// leave start position sample
|
||||
start++;
|
||||
|
|
Loading…
Reference in a new issue