summaryrefslogtreecommitdiff
path: root/src/debug.c
diff options
context:
space:
mode:
authorguybe7 <guy.benoish@redislabs.com>2021-03-31 22:56:04 +0200
committerGitHub <noreply@github.com>2021-03-31 23:56:04 +0300
commit68ba4d43ace055596909c082d436795e81630ee7 (patch)
treeac3a7a0acc0bdd717e9b69b75dc1cfd4523c2aa1 /src/debug.c
parent2c120af61e31ead165175556a9564722d4d0149b (diff)
downloadredis-68ba4d43ace055596909c082d436795e81630ee7.tar.gz
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
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c2
1 files changed, 1 insertions, 1 deletions
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);