mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
[cli] validate prefix add/remove argument count (#3505)
This commit is contained in:
@@ -2120,6 +2120,8 @@ otError Interpreter::ProcessPrefixAdd(int argc, char *argv[])
|
||||
otBorderRouterConfig config;
|
||||
int argcur = 0;
|
||||
|
||||
VerifyOrExit(argc > 0, error = OT_ERROR_INVALID_ARGS);
|
||||
|
||||
memset(&config, 0, sizeof(otBorderRouterConfig));
|
||||
|
||||
char *prefixLengthStr;
|
||||
@@ -2212,6 +2214,8 @@ otError Interpreter::ProcessPrefixRemove(int argc, char *argv[])
|
||||
struct otIp6Prefix prefix;
|
||||
int argcur = 0;
|
||||
|
||||
VerifyOrExit(argc > 0, error = OT_ERROR_INVALID_ARGS);
|
||||
|
||||
memset(&prefix, 0, sizeof(otIp6Prefix));
|
||||
|
||||
char *prefixLengthStr;
|
||||
|
||||
Reference in New Issue
Block a user