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
79a1c19a
Commit
79a1c19a
authored
Jun 17, 2018
by
antirez
Browse files
XADD MAXLEN should return an error for values < 0.
parent
2e0ab4a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_stream.c
View file @
79a1c19a
...
@@ -1105,6 +1105,11 @@ void xaddCommand(client *c) {
...
@@ -1105,6 +1105,11 @@ void xaddCommand(client *c) {
}
}
if (getLongLongFromObjectOrReply(c,c->argv[i+1],&maxlen,NULL)
if (getLongLongFromObjectOrReply(c,c->argv[i+1],&maxlen,NULL)
!= C_OK) return;
!= C_OK) return;
if (maxlen < 0) {
addReplyError(c,"The MAXLEN argument must be equal or greater than zero. A value of zero means that no trimming should be performed.");
return;
}
i++;
i++;
maxlen_arg_idx = i;
maxlen_arg_idx = i;
} else {
} else {
...
...
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