mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
rdbLoad() should check REDIS_RDB_VERSION instead of hardcoded number.
This commit is contained in:
parent
f22cff43a6
commit
053d56a1fa
@ -1039,7 +1039,7 @@ int rdbLoad(char *filename) {
|
|||||||
return REDIS_ERR;
|
return REDIS_ERR;
|
||||||
}
|
}
|
||||||
rdbver = atoi(buf+5);
|
rdbver = atoi(buf+5);
|
||||||
if (rdbver < 1 || rdbver > 5) {
|
if (rdbver < 1 || rdbver > REDIS_RDB_VERSION) {
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
redisLog(REDIS_WARNING,"Can't handle RDB format version %d",rdbver);
|
redisLog(REDIS_WARNING,"Can't handle RDB format version %d",rdbver);
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
|
Loading…
Reference in New Issue
Block a user