Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f48cfa2b
Commit
f48cfa2b
authored
Mar 30, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix buffer size in _ecvt_s.
parent
d5e3e930
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
math.c
dlls/msvcrt/math.c
+5
-5
No files found.
dlls/msvcrt/math.c
View file @
f48cfa2b
...
...
@@ -1306,17 +1306,17 @@ int CDECL _ecvt_s( char *buffer, MSVCRT_size_t length, double number, int ndigit
(
*
sign
)
=
0
;
return
0
;
}
result
=
(
char
*
)
MSVCRT_malloc
(
max
(
ndigits
+
7
,
7
));
/* handle cases with zero ndigits or less */
prec
=
ndigits
;
if
(
prec
<
1
)
prec
=
2
;
result
=
(
char
*
)
MSVCRT_malloc
(
prec
+
7
);
if
(
number
<
0
)
{
*
sign
=
TRUE
;
number
=
-
number
;
}
else
*
sign
=
FALSE
;
/* handle cases with zero ndigits or less */
prec
=
ndigits
;
if
(
prec
<
1
)
prec
=
2
;
len
=
snprintf
(
result
,
80
,
"%.*le"
,
prec
-
1
,
number
);
len
=
snprintf
(
result
,
prec
+
7
,
"%.*le"
,
prec
-
1
,
number
);
/* take the decimal "point away */
if
(
prec
!=
1
)
memmove
(
result
+
1
,
result
+
2
,
len
-
1
);
...
...
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