summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-09-08 09:27:43 +0200
committerantirez <antirez@gmail.com>2015-09-08 09:33:48 +0200
commit35507e7871bb51dc2f3f658078e7712d790569a2 (patch)
treea73a85d919422fb7455e1881b9ec83933afeb4a9
parentfa81cc262455382f91fb0761aa6fef352b5ea6e8 (diff)
downloadredis-35507e7871bb51dc2f3f658078e7712d790569a2.tar.gz
Sentinel: command arity check added where missing.
-rw-r--r--src/sentinel.c2
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,"%@");