mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 21:30:24 +00:00
[cli] fix ping interval bounds check to avoid Timer::Start() assert (#3531)
This commit is contained in:
+2
-3
@@ -1939,9 +1939,8 @@ void Interpreter::ProcessPing(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 3:
|
||||
mInterval = static_cast<uint32_t>(value);
|
||||
VerifyOrExit(mInterval <= Timer::kMaxDt, error = OT_ERROR_INVALID_ARGS);
|
||||
mInterval = mInterval * 1000;
|
||||
VerifyOrExit(value <= Timer::kMaxDt / 1000, error = OT_ERROR_INVALID_ARGS);
|
||||
mInterval = static_cast<uint32_t>(value) * 1000;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user