Add args check to SetRouterSelectionJitter(). (#1296)

This commit is contained in:
Jonathan Hui
2017-02-10 04:17:38 -08:00
committed by GitHub
parent dbbf2252fa
commit 960415285e
3 changed files with 10 additions and 2 deletions
+1
View File
@@ -1961,6 +1961,7 @@ void Interpreter::ProcessRouterSelectionJitter(int argc, char *argv[])
else
{
SuccessOrExit(error = ParseLong(argv[0], value));
VerifyOrExit(0 < value && value < 256, error = kThreadError_InvalidArgs);
otSetRouterSelectionJitter(mInstance, static_cast<uint8_t>(value));
}