Plugs a potential underflow

This commit is contained in:
Itamar Haber 2018-10-17 19:33:11 +03:00
parent ce6c8730a0
commit fbc22b4d21

View File

@ -1921,6 +1921,7 @@ void xpendingCommand(client *c) {
if (c->argc >= 6) {
if (getLongLongFromObjectOrReply(c,c->argv[5],&count,NULL) == C_ERR)
return;
if (count < 0) count = 0;
if (streamParseIDOrReply(c,c->argv[3],&startid,0) == C_ERR)
return;
if (streamParseIDOrReply(c,c->argv[4],&endid,UINT64_MAX) == C_ERR)