From ce6c8730a019977160829cd26fd033bfd7a6c6cd Mon Sep 17 00:00:00 2001 From: Itamar Haber Date: Wed, 17 Oct 2018 16:13:55 +0300 Subject: [PATCH 1/2] Corrects inline documentation of syntax --- src/t_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_stream.c b/src/t_stream.c index f1eee6eb5..6244c7844 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -1892,7 +1892,7 @@ void xackCommand(client *c) { addReplyLongLong(c,acknowledged); } -/* XPENDING [ ] [] +/* XPENDING [ []] * * If start and stop are omitted, the command just outputs information about * the amount of pending messages for the key/group pair, together with From fbc22b4d21a04266a85789f8f45677ac71b32a65 Mon Sep 17 00:00:00 2001 From: Itamar Haber Date: Wed, 17 Oct 2018 19:33:11 +0300 Subject: [PATCH 2/2] Plugs a potential underflow --- src/t_stream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/t_stream.c b/src/t_stream.c index 6244c7844..e4c9fed5a 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -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)