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
fe52b067
Commit
fe52b067
authored
May 17, 2022
by
Brendan Shanks
Committed by
Alexandre Julliard
May 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Avoid truncating pointer to 32-bits in get_cpu_area().
Signed-off-by:
Brendan Shanks
<
bshanks@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
57c04fd0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
process.c
dlls/ntdll/process.c
+1
-1
thread.c
dlls/ntdll/unix/thread.c
+1
-1
No files found.
dlls/ntdll/process.c
View file @
fe52b067
...
...
@@ -161,7 +161,7 @@ NTSTATUS WINAPI RtlWow64GetCpuAreaInfo( WOW64_CPURESERVED *cpu, ULONG reserved,
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
data
);
i
++
)
{
#define ALIGN(ptr,align) ((void *)(((ULONG_PTR)(ptr) + (align) - 1) & ~((align) - 1)))
#define ALIGN(ptr,align) ((void *)(((ULONG_PTR)(ptr) + (align) - 1) & ~((
ULONG_PTR)(
align) - 1)))
if
(
data
[
i
].
machine
!=
cpu
->
Machine
)
continue
;
info
->
Context
=
ALIGN
(
cpu
+
1
,
data
[
i
].
align
);
info
->
ContextEx
=
ALIGN
(
(
char
*
)
info
->
Context
+
data
[
i
].
size
,
sizeof
(
void
*
)
);
...
...
dlls/ntdll/unix/thread.c
View file @
fe52b067
...
...
@@ -1111,7 +1111,7 @@ void *get_cpu_area( USHORT machine )
case
IMAGE_FILE_MACHINE_ARM64
:
align
=
TYPE_ALIGNMENT
(
ARM64_NT_CONTEXT
);
break
;
default:
return
NULL
;
}
return
(
void
*
)(((
ULONG_PTR
)(
cpu
+
1
)
+
align
-
1
)
&
~
(
align
-
1
));
return
(
void
*
)(((
ULONG_PTR
)(
cpu
+
1
)
+
align
-
1
)
&
~
(
(
ULONG_PTR
)
align
-
1
));
}
...
...
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