Permalink
Browse files

rdbLoad() should check REDIS_RDB_VERSION instead of hardcoded number.

  • Loading branch information...
1 parent f22cff4 commit 053d56a1fabc6f0ed5895bd8b3f725a6ee4ffdba @antirez antirez committed Apr 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/rdb.c
View
@@ -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;

0 comments on commit 053d56a

Please sign in to comment.