From acb3b552800c6ee95a36d49b24332b7a6dd93f59 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 f1eee6eb..6244c784 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 edeaf85cab10b2d9bc151363779f70822d679472 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 6244c784..e4c9fed5 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)