mirror of
https://github.com/espressif/openthread.git
synced 2026-07-10 22:30:21 +00:00
[cli] validate ping interval is positive to avoid Timer::Start() assert (#3548)
This commit is contained in:
+1
-1
@@ -1939,7 +1939,7 @@ void Interpreter::ProcessPing(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 3:
|
||||
VerifyOrExit(value <= Timer::kMaxDt / 1000, error = OT_ERROR_INVALID_ARGS);
|
||||
VerifyOrExit(0 < value && value <= Timer::kMaxDt / 1000, error = OT_ERROR_INVALID_ARGS);
|
||||
mInterval = static_cast<uint32_t>(value) * 1000;
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user