Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
053d56a1
Commit
053d56a1
authored
Apr 24, 2012
by
antirez
Browse files
rdbLoad() should check REDIS_RDB_VERSION instead of hardcoded number.
parent
f22cff43
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/rdb.c
View file @
053d56a1
...
@@ -1039,7 +1039,7 @@ int rdbLoad(char *filename) {
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment