提交 41d16f7a 编写于 作者: S Salvatore Sanfilippo 提交者: GitHub

Merge pull request #3657 from itamarhaber/patch-9

Verify pairs are provided after ZADD's subcommands
......@@ -1521,7 +1521,7 @@ void zaddGenericCommand(client *c, int flags) {
/* After the options, we expect to have an even number of args, since
* we expect any number of score-element pairs. */
elements = c->argc-scoreidx;
if (elements % 2) {
if (elements % 2 || !elements) {
addReply(c,shared.syntaxerr);
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册