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
c2459dee
Commit
c2459dee
authored
Jan 12, 2010
by
Jeff Zaroyko
Committed by
Alexandre Julliard
Jan 14, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Check if argument passed to _dup2 is positive.
parent
f4e5ab48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
file.c
dlls/msvcrt/file.c
+1
-1
file.c
dlls/msvcrt/tests/file.c
+1
-1
No files found.
dlls/msvcrt/file.c
View file @
c2459dee
...
...
@@ -705,7 +705,7 @@ int CDECL MSVCRT__dup2(int od, int nd)
TRACE
(
"(od=%d, nd=%d)
\n
"
,
od
,
nd
);
LOCK_FILES
();
if
(
nd
<
MSVCRT_MAX_FILES
&&
msvcrt_is_valid_fd
(
od
))
if
(
nd
<
MSVCRT_MAX_FILES
&&
nd
>=
0
&&
msvcrt_is_valid_fd
(
od
))
{
HANDLE
handle
;
...
...
dlls/msvcrt/tests/file.c
View file @
c2459dee
...
...
@@ -1363,7 +1363,7 @@ static void test_unlink(void)
void
test_dup2
(
void
)
{
todo_wine
ok
(
-
1
==
_dup2
(
0
,
-
1
),
"expected _dup2 to fail when second arg is negative
\n
"
);
ok
(
-
1
==
_dup2
(
0
,
-
1
),
"expected _dup2 to fail when second arg is negative
\n
"
);
}
START_TEST
(
file
)
...
...
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