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
25697797
Commit
25697797
authored
Sep 25, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Require ASLR support on non-x86 platforms.
parent
518e3947
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
mapping.c
server/mapping.c
+18
-0
No files found.
server/mapping.c
View file @
25697797
...
...
@@ -726,6 +726,15 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s
if
(
!
is_machine_32bit
(
nt
.
FileHeader
.
Machine
))
return
STATUS_INVALID_IMAGE_FORMAT
;
if
(
!
is_machine_supported
(
nt
.
FileHeader
.
Machine
))
return
STATUS_INVALID_IMAGE_FORMAT
;
if
(
nt
.
FileHeader
.
Machine
!=
IMAGE_FILE_MACHINE_I386
)
/* non-x86 platforms are more strict */
{
if
(
nt
.
opt
.
hdr32
.
SectionAlignment
&
page_mask
)
return
STATUS_INVALID_IMAGE_FORMAT
;
if
(
!
(
nt
.
opt
.
hdr32
.
DllCharacteristics
&
IMAGE_DLLCHARACTERISTICS_NX_COMPAT
))
return
STATUS_INVALID_IMAGE_FORMAT
;
if
(
!
(
nt
.
opt
.
hdr32
.
DllCharacteristics
&
IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE
))
return
STATUS_INVALID_IMAGE_FORMAT
;
}
if
(
nt
.
opt
.
hdr32
.
NumberOfRvaAndSizes
>
IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR
)
{
clr_va
=
nt
.
opt
.
hdr32
.
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR
].
VirtualAddress
;
...
...
@@ -760,6 +769,15 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s
if
(
!
is_machine_64bit
(
nt
.
FileHeader
.
Machine
))
return
STATUS_INVALID_IMAGE_FORMAT
;
if
(
!
is_machine_supported
(
nt
.
FileHeader
.
Machine
))
return
STATUS_INVALID_IMAGE_FORMAT
;
if
(
nt
.
FileHeader
.
Machine
!=
IMAGE_FILE_MACHINE_AMD64
)
/* non-x86 platforms are more strict */
{
if
(
nt
.
opt
.
hdr64
.
SectionAlignment
&
page_mask
)
return
STATUS_INVALID_IMAGE_FORMAT
;
if
(
!
(
nt
.
opt
.
hdr64
.
DllCharacteristics
&
IMAGE_DLLCHARACTERISTICS_NX_COMPAT
))
return
STATUS_INVALID_IMAGE_FORMAT
;
if
(
!
(
nt
.
opt
.
hdr64
.
DllCharacteristics
&
IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE
))
return
STATUS_INVALID_IMAGE_FORMAT
;
}
if
(
nt
.
opt
.
hdr64
.
NumberOfRvaAndSizes
>
IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR
)
{
clr_va
=
nt
.
opt
.
hdr64
.
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR
].
VirtualAddress
;
...
...
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