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
ebb7d316
Commit
ebb7d316
authored
Jul 25, 2022
by
Brendan Shanks
Committed by
Alexandre Julliard
Jul 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64: Return error from NtQueryVirtualMemory(MemoryBasicInformation) for a too-large address.
parent
fb1bfebb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
syscall.c
dlls/wow64/syscall.c
+2
-0
virtual.c
dlls/wow64/virtual.c
+5
-2
wow64_private.h
dlls/wow64/wow64_private.h
+1
-0
No files found.
dlls/wow64/syscall.c
View file @
ebb7d316
...
...
@@ -36,6 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wow);
USHORT
native_machine
=
0
;
USHORT
current_machine
=
0
;
ULONG_PTR
args_alignment
=
0
;
ULONG_PTR
highest_user_address
=
0x7ffeffff
;
ULONG_PTR
default_zero_bits
=
0x7fffffff
;
typedef
NTSTATUS
(
WINAPI
*
syscall_thunk
)(
UINT
*
args
);
...
...
@@ -573,6 +574,7 @@ static DWORD WINAPI process_init( RTL_RUN_ONCE *once, void *param, void **contex
if
(
!
current_machine
)
current_machine
=
native_machine
;
args_alignment
=
(
current_machine
==
IMAGE_FILE_MACHINE_I386
)
?
sizeof
(
ULONG
)
:
sizeof
(
ULONG64
);
NtQuerySystemInformation
(
SystemEmulationBasicInformation
,
&
info
,
sizeof
(
info
),
NULL
);
highest_user_address
=
(
ULONG_PTR
)
info
.
HighestUserAddress
;
default_zero_bits
=
(
ULONG_PTR
)
info
.
HighestUserAddress
|
0x7fffffff
;
#define GET_PTR(name) p ## name = RtlFindExportedRoutineByName( module, #name )
...
...
dlls/wow64/virtual.c
View file @
ebb7d316
...
...
@@ -381,7 +381,11 @@ NTSTATUS WINAPI wow64_NtQueryVirtualMemory( UINT *args )
switch
(
class
)
{
case
MemoryBasicInformation
:
/* MEMORY_BASIC_INFORMATION */
if
(
len
>=
sizeof
(
MEMORY_BASIC_INFORMATION32
))
if
(
len
<
sizeof
(
MEMORY_BASIC_INFORMATION32
))
status
=
STATUS_INFO_LENGTH_MISMATCH
;
else
if
((
ULONG_PTR
)
addr
>
highest_user_address
)
status
=
STATUS_INVALID_PARAMETER
;
else
{
MEMORY_BASIC_INFORMATION
info
;
MEMORY_BASIC_INFORMATION32
*
info32
=
ptr
;
...
...
@@ -397,7 +401,6 @@ NTSTATUS WINAPI wow64_NtQueryVirtualMemory( UINT *args )
info32
->
Type
=
info
.
Type
;
}
}
else
status
=
STATUS_INFO_LENGTH_MISMATCH
;
res_len
=
sizeof
(
MEMORY_BASIC_INFORMATION32
);
break
;
...
...
dlls/wow64/wow64_private.h
View file @
ebb7d316
...
...
@@ -39,6 +39,7 @@ extern BOOL get_file_redirect( OBJECT_ATTRIBUTES *attr ) DECLSPEC_HIDDEN;
extern
USHORT
native_machine
DECLSPEC_HIDDEN
;
extern
USHORT
current_machine
DECLSPEC_HIDDEN
;
extern
ULONG_PTR
args_alignment
DECLSPEC_HIDDEN
;
extern
ULONG_PTR
highest_user_address
DECLSPEC_HIDDEN
;
extern
ULONG_PTR
default_zero_bits
DECLSPEC_HIDDEN
;
extern
SYSTEM_DLL_INIT_BLOCK
*
pLdrSystemDllInitBlock
DECLSPEC_HIDDEN
;
...
...
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