mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
Fixed possible buffer overflow bug if RDB file is corrupted.
(Note: commit message modified by @antirez for clarity).
This commit is contained in:
parent
433e835d3e
commit
b252fab06c
@ -410,7 +410,7 @@ int rdbSaveDoubleValue(rio *rdb, double val) {
|
|||||||
|
|
||||||
/* For information about double serialization check rdbSaveDoubleValue() */
|
/* For information about double serialization check rdbSaveDoubleValue() */
|
||||||
int rdbLoadDoubleValue(rio *rdb, double *val) {
|
int rdbLoadDoubleValue(rio *rdb, double *val) {
|
||||||
char buf[128];
|
char buf[256];
|
||||||
unsigned char len;
|
unsigned char len;
|
||||||
|
|
||||||
if (rioRead(rdb,&len,1) == 0) return -1;
|
if (rioRead(rdb,&len,1) == 0) return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user