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
231d758e
Commit
231d758e
authored
Dec 06, 2009
by
antirez
Browse files
in rdbLoadDoubleValue now the buffer is nul terminated correctly. Thanks valgrind.
parent
83c6a618
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
231d758e
...
...
@@ -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
;
}
...
...
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