From 68ba4d43ace055596909c082d436795e81630ee7 Mon Sep 17 00:00:00 2001 From: guybe7 Date: Wed, 31 Mar 2021 22:56:04 +0200 Subject: [PATCH] Initialize RedisModuleDigest with zeroes (#8731) In case the module's digest function doesn't modify 'md' it'll contain garbage and result in wrong DEBUG DIGEST --- src/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug.c b/src/debug.c index 62dc89a63..098ce6ef7 100644 --- a/src/debug.c +++ b/src/debug.c @@ -249,7 +249,7 @@ void xorObjectDigest(redisDb *db, robj *keyobj, unsigned char *digest, robj *o) } streamIteratorStop(&si); } else if (o->type == OBJ_MODULE) { - RedisModuleDigest md; + RedisModuleDigest md = {{0},{0}}; moduleValue *mv = o->ptr; moduleType *mt = mv->type; moduleInitDigestContext(md);