RDB: make sure to abort on LZF encoding error.
Former-commit-id: 27fe1658a2019bcd5d880e844bac21ccef8303f2
This commit is contained in:
parent
867070eb99
commit
ebc50797a0
@ -382,8 +382,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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user