From 62bfa66284eceae5dd06c9b3a06f0fb903e55f9d Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 24 Apr 2012 12:53:30 +0200 Subject: [PATCH] rdbLoad() should check REDIS_RDB_VERSION instead of hardcoded number. --- src/rdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rdb.c b/src/rdb.c index 8ffd2c28..e0491a72 100644 --- a/src/rdb.c +++ b/src/rdb.c @@ -1039,7 +1039,7 @@ int rdbLoad(char *filename) { return REDIS_ERR; } rdbver = atoi(buf+5); - if (rdbver < 1 || rdbver > 5) { + if (rdbver < 1 || rdbver > REDIS_RDB_VERSION) { fclose(fp); redisLog(REDIS_WARNING,"Can't handle RDB format version %d",rdbver); errno = EINVAL; -- 2.45.2