From c8adea4024bbc405d96736c26bd2357c902a1f6b Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Fri, 16 Oct 2020 12:49:33 -0400 Subject: redisReply: Fix parent type assertions during double, nil, bool creation Per RESP3, push messages are able to contain exactly what array messages can contain (that is, any other type). --- hiredis.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hiredis.c b/hiredis.c index 2dadf15..5591cb9 100644 --- a/hiredis.c +++ b/hiredis.c @@ -243,7 +243,8 @@ static void *createDoubleObject(const redisReadTask *task, double value, char *s parent = task->parent->obj; assert(parent->type == REDIS_REPLY_ARRAY || parent->type == REDIS_REPLY_MAP || - parent->type == REDIS_REPLY_SET); + parent->type == REDIS_REPLY_SET || + parent->type == REDIS_REPLY_PUSH); parent->element[task->idx] = r; } return r; @@ -280,7 +281,8 @@ static void *createBoolObject(const redisReadTask *task, int bval) { parent = task->parent->obj; assert(parent->type == REDIS_REPLY_ARRAY || parent->type == REDIS_REPLY_MAP || - parent->type == REDIS_REPLY_SET); + parent->type == REDIS_REPLY_SET || + parent->type == REDIS_REPLY_PUSH); parent->element[task->idx] = r; } return r; -- cgit v1.2.3