Merge pull request #6840 from oranagra/short_read_moduleid

Add handling of short read of module id in rdb
This commit is contained in:
Salvatore Sanfilippo 2020-02-06 10:35:42 +01:00 committed by GitHub
commit 730cacf672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1871,7 +1871,10 @@ robj *rdbLoadObject(int rdbtype, rio *rdb, robj *key) {
}
} else if (rdbtype == RDB_TYPE_MODULE || rdbtype == RDB_TYPE_MODULE_2) {
uint64_t moduleid = rdbLoadLen(rdb,NULL);
if (rioGetReadError(rdb)) return NULL;
if (rioGetReadError(rdb)) {
rdbReportReadError("Short read module id");
return NULL;
}
moduleType *mt = moduleTypeLookupModuleByID(moduleid);
char name[10];