mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
XADD MAXLEN should return an error for values < 0.
This commit is contained in:
parent
2e0ab4a807
commit
79a1c19ac2
@ -1105,6 +1105,11 @@ void xaddCommand(client *c) {
|
||||
}
|
||||
if (getLongLongFromObjectOrReply(c,c->argv[i+1],&maxlen,NULL)
|
||||
!= 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++;
|
||||
maxlen_arg_idx = i;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user