From b252fab06c5e3ccb739cdd27db5f5f0ddd03d506 Mon Sep 17 00:00:00 2001 From: Akos Vandra Date: Mon, 12 May 2014 11:35:10 +0200 Subject: [PATCH] Fixed possible buffer overflow bug if RDB file is corrupted. (Note: commit message modified by @antirez for clarity). --- src/rdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rdb.c b/src/rdb.c index 65e2dfc8..07eb8a92 100644 --- a/src/rdb.c +++ b/src/rdb.c @@ -410,7 +410,7 @@ int rdbSaveDoubleValue(rio *rdb, double val) { /* For information about double serialization check rdbSaveDoubleValue() */ int rdbLoadDoubleValue(rio *rdb, double *val) { - char buf[128]; + char buf[256]; unsigned char len; if (rioRead(rdb,&len,1) == 0) return -1;