[cli] validate ping interval is positive to avoid Timer::Start() assert (#3548)

This commit is contained in:
Jonathan Hui
2019-02-04 10:51:45 -08:00
committed by GitHub
parent b2bbad7674
commit 404d946150
+1 -1
View File
@@ -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;