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
This commit is contained in:
guybe7 2021-03-31 22:56:04 +02:00 committed by GitHub
parent 2c120af61e
commit 68ba4d43ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);