From 0652b05caf32ea6ff5d9aeb17607f35446df55c4 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 3 Dec 2018 18:08:00 +0100 Subject: [PATCH] RESP3: fix genericHgetallCommand() assert. --- src/t_hash.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/t_hash.c b/src/t_hash.c index a50da579..70a7b2f4 100644 --- a/src/t_hash.c +++ b/src/t_hash.c @@ -793,6 +793,9 @@ void genericHgetallCommand(client *c, int flags) { } hashTypeReleaseIterator(hi); + + /* Make sure we returned the right number of elements. */ + if (flags & OBJ_HASH_KEY && flags & OBJ_HASH_VALUE) count /= 2; serverAssert(count == length); }