diff options
author | antirez <antirez@gmail.com> | 2015-09-08 09:27:43 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-09-08 09:27:43 +0200 |
commit | 33769f840cd53f03caf8f4b886a7c95182492027 (patch) | |
tree | 9feb9fe7989c2ea220013d3f521a01c534aaa4b7 | |
parent | 0c62d955383a5df85ec78808cf7b79e94827e427 (diff) | |
download | redis-33769f840cd53f03caf8f4b886a7c95182492027.tar.gz |
Sentinel: command arity check added where missing.
-rw-r--r-- | src/sentinel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sentinel.c b/src/sentinel.c index 38e987cd6..a246a5b37 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -3023,6 +3023,7 @@ void sentinelCommand(client *c) { addReply(c,shared.ok); } } else if (!strcasecmp(c->argv[1]->ptr,"flushconfig")) { + if (c->argc != 2) goto numargserr; sentinelFlushConfig(); addReply(c,shared.ok); return; @@ -3030,6 +3031,7 @@ void sentinelCommand(client *c) { /* SENTINEL REMOVE <name> */ sentinelRedisInstance *ri; + if (c->argc != 3) goto numargserr; if ((ri = sentinelGetMasterByNameOrReplyError(c,c->argv[2])) == NULL) return; sentinelEvent(LL_WARNING,"-monitor",ri,"%@"); |