diff options
author | antirez <antirez@gmail.com> | 2015-09-08 09:27:43 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-09-08 09:33:48 +0200 |
commit | 35507e7871bb51dc2f3f658078e7712d790569a2 (patch) | |
tree | a73a85d919422fb7455e1881b9ec83933afeb4a9 | |
parent | fa81cc262455382f91fb0761aa6fef352b5ea6e8 (diff) | |
download | redis-35507e7871bb51dc2f3f658078e7712d790569a2.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 4498767d4..2263a5849 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -2791,6 +2791,7 @@ void sentinelCommand(redisClient *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; @@ -2798,6 +2799,7 @@ void sentinelCommand(redisClient *c) { /* SENTINEL REMOVE <name> */ sentinelRedisInstance *ri; + if (c->argc != 3) goto numargserr; if ((ri = sentinelGetMasterByNameOrReplyError(c,c->argv[2])) == NULL) return; sentinelEvent(REDIS_WARNING,"-monitor",ri,"%@"); |