Unverified Commit bdceaf50 authored by Binbin's avatar Binbin Committed by GitHub
Browse files

Fix the check for new RDB_OPCODE_SLOT_INFO in redis-check-rdb (#12768)

We did not read expires_slot_size, causing its check to fail.
An overlook in #11695.
parent 3431b1f1
...@@ -277,11 +277,13 @@ int redis_check_rdb(char *rdbfilename, FILE *fp) { ...@@ -277,11 +277,13 @@ int redis_check_rdb(char *rdbfilename, FILE *fp) {
goto eoferr; goto eoferr;
continue; /* Read type again. */ continue; /* Read type again. */
} else if (type == RDB_OPCODE_SLOT_INFO) { } else if (type == RDB_OPCODE_SLOT_INFO) {
uint64_t slot_id, slot_size; uint64_t slot_id, slot_size, expires_slot_size;
if ((slot_id = rdbLoadLen(&rdb,NULL)) == RDB_LENERR) if ((slot_id = rdbLoadLen(&rdb,NULL)) == RDB_LENERR)
goto eoferr; goto eoferr;
if ((slot_size = rdbLoadLen(&rdb,NULL)) == RDB_LENERR) if ((slot_size = rdbLoadLen(&rdb,NULL)) == RDB_LENERR)
goto eoferr; goto eoferr;
if ((expires_slot_size = rdbLoadLen(&rdb,NULL)) == RDB_LENERR)
goto eoferr;
continue; /* Read type again. */ continue; /* Read type again. */
} else if (type == RDB_OPCODE_AUX) { } else if (type == RDB_OPCODE_AUX) {
/* AUX: generic string-string fields. Use to add state to RDB /* AUX: generic string-string fields. Use to add state to RDB
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment