Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
433e835d
"vscode:/vscode.git/clone" did not exist on "1bc557c9c5985b63f71c122e1219878dced7cb67"
Commit
433e835d
authored
May 12, 2014
by
Akos Vandra
Committed by
antirez
May 12, 2014
Browse files
fixed possible buffer overflow error
parent
658ad301
Changes
1
Show whitespace changes
Inline
Side-by-side
src/rdb.c
View file @
433e835d
...
@@ -398,7 +398,7 @@ int rdbSaveDoubleValue(rio *rdb, double val) {
...
@@ -398,7 +398,7 @@ int rdbSaveDoubleValue(rio *rdb, double val) {
double
min
=
-
4503599627370495
;
/* (2^52)-1 */
double
min
=
-
4503599627370495
;
/* (2^52)-1 */
double
max
=
4503599627370496
;
/* -(2^52) */
double
max
=
4503599627370496
;
/* -(2^52) */
if
(
val
>
min
&&
val
<
max
&&
val
==
((
double
)((
long
long
)
val
)))
if
(
val
>
min
&&
val
<
max
&&
val
==
((
double
)((
long
long
)
val
)))
ll2string
((
char
*
)
buf
+
1
,
sizeof
(
buf
),(
long
long
)
val
);
ll2string
((
char
*
)
buf
+
1
,
sizeof
(
buf
)
-
1
,(
long
long
)
val
);
else
else
#endif
#endif
snprintf
((
char
*
)
buf
+
1
,
sizeof
(
buf
)
-
1
,
"%.17g"
,
val
);
snprintf
((
char
*
)
buf
+
1
,
sizeof
(
buf
)
-
1
,
"%.17g"
,
val
);
...
...
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