Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
4dba956e
Commit
4dba956e
authored
Nov 26, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add parameter checking in _controlfp_s.
parent
1ae23af8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
math.c
dlls/msvcrt/math.c
+8
-18
No files found.
dlls/msvcrt/math.c
View file @
4dba956e
...
...
@@ -909,12 +909,7 @@ unsigned int CDECL _control87(unsigned int newval, unsigned int mask)
*/
unsigned
int
CDECL
_controlfp
(
unsigned
int
newval
,
unsigned
int
mask
)
{
#ifdef __i386__
return
_control87
(
newval
,
mask
&
~
MSVCRT__EM_DENORMAL
);
#else
FIXME
(
":Not Implemented!
\n
"
);
return
0
;
#endif
}
/*********************************************************************
...
...
@@ -922,21 +917,16 @@ unsigned int CDECL _controlfp(unsigned int newval, unsigned int mask)
*/
int
CDECL
_controlfp_s
(
unsigned
int
*
cur
,
unsigned
int
newval
,
unsigned
int
mask
)
{
#ifdef __i386__
unsigned
int
flags
;
FIXME
(
"(%p %u %u) semi-stub
\n
"
,
cur
,
newval
,
mask
);
flags
=
_control87
(
newval
,
mask
&
~
MSVCRT__EM_DENORMAL
);
static
const
unsigned
int
all_flags
=
(
MSVCRT__MCW_EM
|
MSVCRT__MCW_IC
|
MSVCRT__MCW_RC
|
MSVCRT__MCW_PC
|
MSVCRT__MCW_DN
);
if
(
cur
)
*
cur
=
flags
;
return
0
;
#else
FIXME
(
":Not Implemented!
\n
"
);
if
(
!
MSVCRT_CHECK_PMT
(
cur
!=
NULL
)
||
!
MSVCRT_CHECK_PMT
(
!
(
mask
&
~
all_flags
)
)
)
{
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
MSVCRT_EINVAL
;
}
*
cur
=
_controlfp
(
newval
,
mask
);
return
0
;
#endif
}
/*********************************************************************
...
...
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