mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
fix redis-rdb-check to provide proper arguments to rdbLoadMillisecondTime
due to incorrect forward declaration, it didn't provide all arguments. this lead to random value being read from the stack and return of incorrect time, which in this case doesn't matter since no one uses it.
This commit is contained in:
parent
44571088d8
commit
f31b0405f0
@ -129,6 +129,8 @@ int rdbLoadType(rio *rdb);
|
|||||||
int rdbSaveTime(rio *rdb, time_t t);
|
int rdbSaveTime(rio *rdb, time_t t);
|
||||||
time_t rdbLoadTime(rio *rdb);
|
time_t rdbLoadTime(rio *rdb);
|
||||||
int rdbSaveLen(rio *rdb, uint64_t len);
|
int rdbSaveLen(rio *rdb, uint64_t len);
|
||||||
|
int rdbSaveMillisecondTime(rio *rdb, long long t);
|
||||||
|
long long rdbLoadMillisecondTime(rio *rdb, int rdbver);
|
||||||
uint64_t rdbLoadLen(rio *rdb, int *isencoded);
|
uint64_t rdbLoadLen(rio *rdb, int *isencoded);
|
||||||
int rdbLoadLenByRef(rio *rdb, int *isencoded, uint64_t *lenptr);
|
int rdbLoadLenByRef(rio *rdb, int *isencoded, uint64_t *lenptr);
|
||||||
int rdbSaveObjectType(rio *rdb, robj *o);
|
int rdbSaveObjectType(rio *rdb, robj *o);
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
|
|
||||||
void createSharedObjects(void);
|
void createSharedObjects(void);
|
||||||
void rdbLoadProgressCallback(rio *r, const void *buf, size_t len);
|
void rdbLoadProgressCallback(rio *r, const void *buf, size_t len);
|
||||||
long long rdbLoadMillisecondTime(rio *rdb);
|
|
||||||
int rdbCheckMode = 0;
|
int rdbCheckMode = 0;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
@ -224,7 +223,7 @@ int redis_check_rdb(char *rdbfilename, FILE *fp) {
|
|||||||
/* EXPIRETIME_MS: milliseconds precision expire times introduced
|
/* EXPIRETIME_MS: milliseconds precision expire times introduced
|
||||||
* with RDB v3. Like EXPIRETIME but no with more precision. */
|
* with RDB v3. Like EXPIRETIME but no with more precision. */
|
||||||
rdbstate.doing = RDB_CHECK_DOING_READ_EXPIRE;
|
rdbstate.doing = RDB_CHECK_DOING_READ_EXPIRE;
|
||||||
if ((expiretime = rdbLoadMillisecondTime(&rdb)) == -1) goto eoferr;
|
if ((expiretime = rdbLoadMillisecondTime(&rdb, rdbver)) == -1) goto eoferr;
|
||||||
continue; /* Read next opcode. */
|
continue; /* Read next opcode. */
|
||||||
} else if (type == RDB_OPCODE_FREQ) {
|
} else if (type == RDB_OPCODE_FREQ) {
|
||||||
/* FREQ: LFU frequency. */
|
/* FREQ: LFU frequency. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user