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
689a49b5
Commit
689a49b5
authored
Mar 10, 2009
by
Rob Shearman
Committed by
Alexandre Julliard
Mar 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Add a check for a NULL ref pointer to NdrPointerUnmarshall.
parent
8cdda268
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+14
-4
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
689a49b5
...
...
@@ -1500,18 +1500,28 @@ unsigned char * WINAPI NdrPointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
TRACE
(
"(%p,%p,%p,%d)
\n
"
,
pStubMsg
,
ppMemory
,
pFormat
,
fMustAlloc
);
if
(
*
pFormat
==
RPC_FC_RP
)
{
Buffer
=
pStubMsg
->
Buffer
;
/* Do the NULL ref pointer check here because embedded pointers can be
* NULL if the type the pointer is embedded in was allocated rather than
* being passed in by the client */
if
(
pStubMsg
->
IsClient
&&
!*
ppMemory
)
{
ERR
(
"NULL ref pointer is not allowed
\n
"
);
RpcRaiseException
(
RPC_X_NULL_REF_POINTER
);
}
}
else
{
/* Increment the buffer here instead of in PointerUnmarshall,
* as that is used by embedded pointers which already handle the incrementing
* the buffer, and shouldn't read any additional pointer data from the
* buffer */
if
(
*
pFormat
!=
RPC_FC_RP
)
{
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
4
);
Buffer
=
pStubMsg
->
Buffer
;
safe_buffer_increment
(
pStubMsg
,
4
);
}
else
Buffer
=
pStubMsg
->
Buffer
;
PointerUnmarshall
(
pStubMsg
,
Buffer
,
ppMemory
,
*
ppMemory
,
pFormat
,
fMustAlloc
);
...
...
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