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
4a59ac76
Commit
4a59ac76
authored
Aug 12, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Check for a 32-bit NT header before getting module address range in MODULE_GetBinaryType.
parent
5e4f0cf5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
module.c
dlls/kernel32/module.c
+13
-2
No files found.
dlls/kernel32/module.c
View file @
4a59ac76
...
...
@@ -282,7 +282,7 @@ DWORD MODULE_GetBinaryType( HANDLE hfile, void **res_start, void **res_end )
union
{
IMAGE_OS2_HEADER
os2
;
IMAGE_NT_HEADERS
nt
;
IMAGE_NT_HEADERS
32
nt
;
}
ext_header
;
/* We do have a DOS image so we will now try to seek into
...
...
@@ -311,7 +311,18 @@ DWORD MODULE_GetBinaryType( HANDLE hfile, void **res_start, void **res_end )
if
(
res_start
)
*
res_start
=
(
void
*
)
ext_header
.
nt
.
OptionalHeader
.
ImageBase
;
if
(
res_end
)
*
res_end
=
(
void
*
)(
ext_header
.
nt
.
OptionalHeader
.
ImageBase
+
ext_header
.
nt
.
OptionalHeader
.
SizeOfImage
);
return
ret
;
switch
(
ext_header
.
nt
.
OptionalHeader
.
Magic
)
{
case
IMAGE_NT_OPTIONAL_HDR32_MAGIC
:
if
(
res_start
)
*
res_start
=
(
void
*
)
ext_header
.
nt
.
OptionalHeader
.
ImageBase
;
if
(
res_end
)
*
res_end
=
(
void
*
)(
ext_header
.
nt
.
OptionalHeader
.
ImageBase
+
ext_header
.
nt
.
OptionalHeader
.
SizeOfImage
);
return
ret
;
case
IMAGE_NT_OPTIONAL_HDR64_MAGIC
:
if
(
res_start
)
*
res_start
=
NULL
;
if
(
res_end
)
*
res_end
=
NULL
;
return
ret
;
}
}
return
BINARY_DOS
;
}
...
...
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