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
b79b158d
Commit
b79b158d
authored
Feb 11, 2021
by
Brendan Shanks
Committed by
Alexandre Julliard
Feb 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Always use MAP_FAILED as mmap()'s error value.
Signed-off-by:
Brendan Shanks
<
bshanks@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
141fdcc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
virtual.c
dlls/ntdll/unix/virtual.c
+2
-2
No files found.
dlls/ntdll/unix/virtual.c
View file @
b79b158d
...
...
@@ -1807,7 +1807,7 @@ static NTSTATUS map_file_into_view( struct file_view *view, int fd, size_t start
/* only try mmap if media is not removable (or if we require write access) */
if
(
!
removable
||
(
flags
&
MAP_SHARED
))
{
if
(
mmap
(
(
char
*
)
view
->
base
+
start
,
size
,
prot
,
flags
,
fd
,
offset
)
!=
(
void
*
)
-
1
)
if
(
mmap
(
(
char
*
)
view
->
base
+
start
,
size
,
prot
,
flags
,
fd
,
offset
)
!=
MAP_FAILED
)
goto
done
;
switch
(
errno
)
...
...
@@ -1970,7 +1970,7 @@ static NTSTATUS map_pe_header( void *ptr, size_t size, int fd, BOOL *removable )
if
(
!*
removable
)
{
if
(
mmap
(
ptr
,
size
,
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
MAP_FIXED
|
MAP_PRIVATE
,
fd
,
0
)
!=
(
void
*
)
-
1
)
if
(
mmap
(
ptr
,
size
,
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
MAP_FIXED
|
MAP_PRIVATE
,
fd
,
0
)
!=
MAP_FAILED
)
return
STATUS_SUCCESS
;
switch
(
errno
)
...
...
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