summaryrefslogtreecommitdiff
path: root/src/script.c
diff options
context:
space:
mode:
authorMadelyn Olson <34459052+madolson@users.noreply.github.com>2022-01-24 22:08:57 -0800
committerGitHub <noreply@github.com>2022-01-24 22:08:57 -0800
commitc275010fffe03ac83c5636ed464d7e57f7d96005 (patch)
tree615218fffa8ffe372b66ccf47b1148fb4907eeb1 /src/script.c
parent0343fe9fa5a359c97ec2116f8ea2d79fd7bfd6d4 (diff)
downloadredis-c275010fffe03ac83c5636ed464d7e57f7d96005.tar.gz
Correctly handle minimum arity checks in scripts (#10171)
Correctly handle variable arity checks in scripts
Diffstat (limited to 'src/script.c')
-rw-r--r--src/script.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script.c b/src/script.c
index ded531e14..14a64b961 100644
--- a/src/script.c
+++ b/src/script.c
@@ -284,7 +284,7 @@ void scriptKill(client *c, int is_eval) {
}
static int scriptVerifyCommandArity(struct redisCommand *cmd, int argc, sds *err) {
- if (!cmd || ((cmd->arity > 0 && cmd->arity != argc) || (argc < cmd->arity))) {
+ if (!cmd || ((cmd->arity > 0 && cmd->arity != argc) || (argc < -cmd->arity))) {
if (cmd)
*err = sdsnew("Wrong number of args calling Redis command from script");
else