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
8fe759df
Commit
8fe759df
authored
Jun 21, 2014
by
Thomas Faber
Committed by
Alexandre Julliard
Jun 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Do not omit mandatory argument to VirtualProtect.
parent
b2d22ecb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
cproxy.c
dlls/rpcrt4/cproxy.c
+2
-1
cstub.c
dlls/rpcrt4/cstub.c
+2
-1
No files found.
dlls/rpcrt4/cproxy.c
View file @
8fe759df
...
...
@@ -192,13 +192,14 @@ static const struct thunk *allocate_block( unsigned int num )
{
unsigned
int
i
;
struct
thunk
*
prev
,
*
block
;
DWORD
oldprot
;
block
=
VirtualAlloc
(
NULL
,
BLOCK_SIZE
*
sizeof
(
*
block
),
MEM_COMMIT
|
MEM_RESERVE
,
PAGE_EXECUTE_READWRITE
);
if
(
!
block
)
return
NULL
;
for
(
i
=
0
;
i
<
BLOCK_SIZE
;
i
++
)
init_thunk
(
&
block
[
i
],
BLOCK_SIZE
*
num
+
i
+
3
);
VirtualProtect
(
block
,
BLOCK_SIZE
*
sizeof
(
*
block
),
PAGE_EXECUTE_READ
,
NULL
);
VirtualProtect
(
block
,
BLOCK_SIZE
*
sizeof
(
*
block
),
PAGE_EXECUTE_READ
,
&
oldprot
);
prev
=
InterlockedCompareExchangePointer
(
(
void
**
)
&
method_blocks
[
num
],
block
,
NULL
);
if
(
prev
)
/* someone beat us to it */
{
...
...
dlls/rpcrt4/cstub.c
View file @
8fe759df
...
...
@@ -194,6 +194,7 @@ static const vtbl_method_t *allocate_block( unsigned int num )
{
unsigned
int
i
;
vtbl_method_t
*
prev
,
*
block
;
DWORD
oldprot
;
block
=
VirtualAlloc
(
NULL
,
BLOCK_SIZE
*
sizeof
(
*
block
),
MEM_COMMIT
|
MEM_RESERVE
,
PAGE_EXECUTE_READWRITE
);
...
...
@@ -204,7 +205,7 @@ static const vtbl_method_t *allocate_block( unsigned int num )
memcpy
(
&
block
[
i
],
opcodes
,
sizeof
(
opcodes
)
);
block
[
i
].
offset
=
(
BLOCK_SIZE
*
num
+
i
+
3
)
*
sizeof
(
void
*
);
}
VirtualProtect
(
block
,
BLOCK_SIZE
*
sizeof
(
*
block
),
PAGE_EXECUTE_READ
,
NULL
);
VirtualProtect
(
block
,
BLOCK_SIZE
*
sizeof
(
*
block
),
PAGE_EXECUTE_READ
,
&
oldprot
);
prev
=
InterlockedCompareExchangePointer
(
(
void
**
)
&
method_blocks
[
num
],
block
,
NULL
);
if
(
prev
)
/* someone beat us to it */
{
...
...
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