Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
41d16f7a
Commit
41d16f7a
authored
Jan 25, 2017
by
Salvatore Sanfilippo
Committed by
GitHub
Jan 25, 2017
Browse files
Merge pull request #3657 from itamarhaber/patch-9
Verify pairs are provided after ZADD's subcommands
parents
43269984
5dc4fe15
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_zset.c
View file @
41d16f7a
...
@@ -1521,7 +1521,7 @@ void zaddGenericCommand(client *c, int flags) {
...
@@ -1521,7 +1521,7 @@ void zaddGenericCommand(client *c, int flags) {
/* After the options, we expect to have an even number of args, since
/* After the options, we expect to have an even number of args, since
* we expect any number of score-element pairs. */
* we expect any number of score-element pairs. */
elements
=
c
->
argc
-
scoreidx
;
elements
=
c
->
argc
-
scoreidx
;
if
(
elements
%
2
)
{
if
(
elements
%
2
||
!
elements
)
{
addReply
(
c
,
shared
.
syntaxerr
);
addReply
(
c
,
shared
.
syntaxerr
);
return
;
return
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment