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
d5ff3467
Commit
d5ff3467
authored
Dec 13, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Dec 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Fix the check in NdrPointerFree.
Add comments to justify why this is the only check that is needed.
parent
9d8ebc1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+8
-6
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
d5ff3467
...
...
@@ -1270,12 +1270,14 @@ static void PointerFree(PMIDL_STUB_MESSAGE pStubMsg,
m
=
NdrFreer
[
*
desc
&
NDR_TABLE_MASK
];
if
(
m
)
m
(
pStubMsg
,
Pointer
,
desc
);
/* we should check if the memory comes from NdrAllocate,
* and deallocate only if so - checking if the pointer is between
* BufferStart and BufferEnd will not always work since the buffer
* may be reallocated when the server wants to marshal the reply */
if
(
Pointer
>=
(
unsigned
char
*
)
pStubMsg
->
RpcMsg
->
Buffer
||
Pointer
<=
(
unsigned
char
*
)
pStubMsg
->
RpcMsg
->
Buffer
+
pStubMsg
->
BufferLength
)
/* this check stops us from trying to free buffer memory. we don't have to
* worry about clients, since they won't call this function.
* we don't have to check for the buffer being reallocated because
* BufferStart and BufferEnd won't be reset when allocating memory for
* sending the response. we don't have to check for the new buffer here as
* it won't be used a type memory, only for buffer memory */
if
(
Pointer
>=
(
unsigned
char
*
)
pStubMsg
->
BufferStart
&&
Pointer
<
(
unsigned
char
*
)
pStubMsg
->
BufferEnd
)
goto
notfree
;
if
(
attr
&
RPC_FC_P_ONSTACK
)
{
...
...
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