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
41275cba
Commit
41275cba
authored
Jan 30, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Don't return 64-bit image info to 32-bit processes.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f9bd73c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
loader.c
dlls/kernel32/tests/loader.c
+0
-3
virtual.c
dlls/ntdll/virtual.c
+9
-0
No files found.
dlls/kernel32/tests/loader.c
View file @
41275cba
...
...
@@ -290,15 +290,12 @@ static BOOL query_image_section( int id, const char *dll_name, const IMAGE_NT_HE
entry_point
=
(
char
*
)(
ULONG_PTR
)
nt32
->
OptionalHeader
.
ImageBase
+
nt32
->
OptionalHeader
.
AddressOfEntryPoint
;
truncated
=
nt_header
->
FileHeader
.
SizeOfOptionalHeader
<
sizeof
(
IMAGE_OPTIONAL_HEADER32
);
}
todo_wine_if
(
entry_point
==
(
void
*
)
0x81231234
)
ok
(
(
char
*
)
image
.
TransferAddress
==
(
char
*
)
entry_point
,
"%u: TransferAddress wrong %p / %p (%08x)
\n
"
,
id
,
image
.
TransferAddress
,
entry_point
,
nt_header
->
OptionalHeader
.
AddressOfEntryPoint
);
ok
(
image
.
ZeroBits
==
0
,
"%u: ZeroBits wrong %08x
\n
"
,
id
,
image
.
ZeroBits
);
todo_wine_if
(
entry_point
==
(
void
*
)
0x81231234
)
ok
(
image
.
MaximumStackSize
==
max_stack
||
broken
(
truncated
),
"%u: MaximumStackSize wrong %lx / %lx
\n
"
,
id
,
image
.
MaximumStackSize
,
max_stack
);
todo_wine_if
(
entry_point
==
(
void
*
)
0x81231234
)
ok
(
image
.
CommittedStackSize
==
commit_stack
||
broken
(
truncated
),
"%u: CommittedStackSize wrong %lx / %lx
\n
"
,
id
,
image
.
CommittedStackSize
,
commit_stack
);
if
(
truncated
)
...
...
dlls/ntdll/virtual.c
View file @
41275cba
...
...
@@ -3215,6 +3215,15 @@ NTSTATUS WINAPI NtQuerySection( HANDLE handle, SECTION_INFORMATION_CLASS class,
info
->
ImageFileSize
=
image_info
.
file_size
;
info
->
CheckSum
=
image_info
.
checksum
;
if
(
ret_size
)
*
ret_size
=
sizeof
(
*
info
);
#ifndef _WIN64
/* don't return 64-bit values to 32-bit processes */
if
(
image_info
.
machine
==
IMAGE_FILE_MACHINE_AMD64
||
image_info
.
machine
==
IMAGE_FILE_MACHINE_ARM64
)
{
info
->
TransferAddress
=
(
void
*
)
0x81231234
;
/* sic */
info
->
MaximumStackSize
=
0x100000
;
info
->
CommittedStackSize
=
0x10000
;
}
#endif
}
else
status
=
STATUS_SECTION_NOT_IMAGE
;
}
...
...
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