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
8668369b
Commit
8668369b
authored
Nov 28, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Nov 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Fix an integer overflow in NdrConformantStructMarshall and NdrConformantStructUnmarshall.
parent
074898ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+12
-0
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
8668369b
...
...
@@ -3399,6 +3399,12 @@ unsigned char * WINAPI NdrConformantStructMarshall(PMIDL_STUB_MESSAGE pStubMsg,
TRACE
(
"memory_size = %d
\n
"
,
pCStructFormat
->
memory_size
);
bufsize
=
safe_multiply
(
esize
,
pStubMsg
->
MaxCount
);
if
(
pCStructFormat
->
memory_size
+
bufsize
<
pCStructFormat
->
memory_size
)
/* integer overflow */
{
ERR
(
"integer overflow of memory_size %u with bufsize %u
\n
"
,
pCStructFormat
->
memory_size
,
bufsize
);
RpcRaiseException
(
RPC_X_BAD_STUB_DATA
);
}
/* copy constant sized part of struct */
pStubMsg
->
BufferMark
=
pStubMsg
->
Buffer
;
safe_copy_to_buffer
(
pStubMsg
,
pMemory
,
pCStructFormat
->
memory_size
+
bufsize
);
...
...
@@ -3447,6 +3453,12 @@ unsigned char * WINAPI NdrConformantStructUnmarshall(PMIDL_STUB_MESSAGE pStubMs
TRACE
(
"memory_size = %d
\n
"
,
pCStructFormat
->
memory_size
);
bufsize
=
safe_multiply
(
esize
,
pStubMsg
->
MaxCount
);
if
(
pCStructFormat
->
memory_size
+
bufsize
<
pCStructFormat
->
memory_size
)
/* integer overflow */
{
ERR
(
"integer overflow of memory_size %u with bufsize %u
\n
"
,
pCStructFormat
->
memory_size
,
bufsize
);
RpcRaiseException
(
RPC_X_BAD_STUB_DATA
);
}
/* work out how much memory to allocate if we need to do so */
if
(
!*
ppMemory
||
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