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
5f450e49
Commit
5f450e49
authored
Jul 18, 2019
by
antirez
Browse files
RDB: make sure to abort on LZF encoding error.
parent
bd0f06c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/rdb.c
View file @
5f450e49
...
@@ -386,8 +386,7 @@ void *rdbLoadLzfStringObject(rio *rdb, int flags, size_t *lenptr) {
...
@@ -386,8 +386,7 @@ void *rdbLoadLzfStringObject(rio *rdb, int flags, size_t *lenptr) {
/* Load the compressed representation and uncompress it to target. */
/* Load the compressed representation and uncompress it to target. */
if
(
rioRead
(
rdb
,
c
,
clen
)
==
0
)
goto
err
;
if
(
rioRead
(
rdb
,
c
,
clen
)
==
0
)
goto
err
;
if
(
lzf_decompress
(
c
,
clen
,
val
,
len
)
==
0
)
{
if
(
lzf_decompress
(
c
,
clen
,
val
,
len
)
==
0
)
{
if
(
rdbCheckMode
)
rdbCheckSetError
(
"Invalid LZF compressed string"
);
rdbExitReportCorruptRDB
(
"Invalid LZF compressed string"
);
goto
err
;
}
}
zfree
(
c
);
zfree
(
c
);
...
...
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