diff options
author | Madelyn Olson <34459052+madolson@users.noreply.github.com> | 2022-01-24 22:08:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-24 22:08:57 -0800 |
commit | c275010fffe03ac83c5636ed464d7e57f7d96005 (patch) | |
tree | 615218fffa8ffe372b66ccf47b1148fb4907eeb1 /src/script.c | |
parent | 0343fe9fa5a359c97ec2116f8ea2d79fd7bfd6d4 (diff) | |
download | redis-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.c | 2 |
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 |