in rdbLoadDoubleValue now the buffer is nul terminated correctly. Thanks valgrind.

This commit is contained in:
antirez 2009-12-06 01:42:41 +01:00
parent 83c6a61889
commit 231d758eec

View File

@ -2823,6 +2823,7 @@ static int rdbLoadDoubleValue(FILE *fp, double *val) {
case 253: *val = R_Nan; return 0;
default:
if (fread(buf,len,1,fp) == 0) return -1;
buf[len] = '\0';
sscanf(buf, "%lg", val);
return 0;
}