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
17eb6f44
Commit
17eb6f44
authored
Dec 20, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Dec 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Print an error if stub buffer pointer is passed into safe_copy_from_buffer.
Also print an error message if there was an overflow.
parent
72c5aea6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+6
-0
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
17eb6f44
...
...
@@ -664,7 +664,13 @@ static inline void safe_copy_from_buffer(MIDL_STUB_MESSAGE *pStubMsg, void *p, U
{
if
((
pStubMsg
->
Buffer
+
size
<
pStubMsg
->
Buffer
)
||
/* integer overflow of pStubMsg->Buffer */
(
pStubMsg
->
Buffer
+
size
>
pStubMsg
->
BufferEnd
))
{
ERR
(
"buffer overflow - Buffer = %p, BufferEnd = %p, size = %u
\n
"
,
pStubMsg
->
Buffer
,
pStubMsg
->
BufferEnd
,
size
);
RpcRaiseException
(
RPC_X_BAD_STUB_DATA
);
}
if
(
p
==
pStubMsg
->
Buffer
)
ERR
(
"pointer is the same as the buffer
\n
"
);
memcpy
(
p
,
pStubMsg
->
Buffer
,
size
);
pStubMsg
->
Buffer
+=
size
;
}
...
...
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