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
2479aec4
Commit
2479aec4
authored
May 15, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
May 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Save pStubMsg->ActualCount in a local variable in the complex
array functions, before calling a function that could change it and cause the wrong number of loop iterations.
parent
345c9264
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+15
-10
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
2479aec4
...
...
@@ -2283,7 +2283,7 @@ unsigned char * WINAPI NdrComplexArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
)
{
ULONG
count
,
def
;
ULONG
i
,
count
,
def
;
BOOL
variance_present
;
unsigned
char
alignment
;
...
...
@@ -2314,7 +2314,8 @@ unsigned char * WINAPI NdrComplexArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg,
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
alignment
);
for
(
count
=
0
;
count
<
pStubMsg
->
ActualCount
;
count
++
)
count
=
pStubMsg
->
ActualCount
;
for
(
i
=
0
;
i
<
count
;
i
++
)
pMemory
=
ComplexMarshall
(
pStubMsg
,
pMemory
,
pFormat
,
NULL
);
STD_OVERFLOW_CHECK
(
pStubMsg
);
...
...
@@ -2330,7 +2331,7 @@ unsigned char * WINAPI NdrComplexArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
)
{
ULONG
count
,
esize
;
ULONG
i
,
count
,
esize
;
unsigned
char
alignment
;
unsigned
char
*
pMemory
;
unsigned
char
*
Buffer
;
...
...
@@ -2364,7 +2365,8 @@ unsigned char * WINAPI NdrComplexArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
alignment
);
pMemory
=
*
ppMemory
;
for
(
count
=
0
;
count
<
pStubMsg
->
ActualCount
;
count
++
)
count
=
pStubMsg
->
ActualCount
;
for
(
i
=
0
;
i
<
count
;
i
++
)
pMemory
=
ComplexUnmarshall
(
pStubMsg
,
pMemory
,
pFormat
,
NULL
,
fMustAlloc
);
return
NULL
;
...
...
@@ -2377,7 +2379,7 @@ void WINAPI NdrComplexArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
)
{
ULONG
count
,
def
;
ULONG
i
,
count
,
def
;
unsigned
char
alignment
;
BOOL
variance_present
;
...
...
@@ -2408,7 +2410,8 @@ void WINAPI NdrComplexArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
ALIGN_LENGTH
(
pStubMsg
->
BufferLength
,
alignment
);
for
(
count
=
0
;
count
<
pStubMsg
->
ActualCount
;
count
++
)
count
=
pStubMsg
->
ActualCount
;
for
(
i
=
0
;
i
<
count
;
i
++
)
pMemory
=
ComplexBufferSize
(
pStubMsg
,
pMemory
,
pFormat
,
NULL
);
}
...
...
@@ -2418,7 +2421,7 @@ void WINAPI NdrComplexArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
long
WINAPI
NdrComplexArrayMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
)
{
ULONG
count
,
esize
;
ULONG
i
,
count
,
esize
;
unsigned
char
alignment
;
unsigned
char
*
Buffer
;
unsigned
long
SavedMemorySize
;
...
...
@@ -2450,7 +2453,8 @@ unsigned long WINAPI NdrComplexArrayMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
MemorySize
=
esize
*
pStubMsg
->
MaxCount
;
for
(
count
=
0
;
count
<
pStubMsg
->
ActualCount
;
count
++
)
count
=
pStubMsg
->
ActualCount
;
for
(
i
=
0
;
i
<
count
;
i
++
)
ComplexStructMemorySize
(
pStubMsg
,
pFormat
);
pStubMsg
->
MemorySize
=
SavedMemorySize
;
...
...
@@ -2466,7 +2470,7 @@ void WINAPI NdrComplexArrayFree(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
)
{
ULONG
count
,
def
;
ULONG
i
,
count
,
def
;
TRACE
(
"(%p,%p,%p)
\n
"
,
pStubMsg
,
pMemory
,
pFormat
);
...
...
@@ -2486,7 +2490,8 @@ void WINAPI NdrComplexArrayFree(PMIDL_STUB_MESSAGE pStubMsg,
pFormat
=
ComputeVariance
(
pStubMsg
,
pMemory
,
pFormat
,
pStubMsg
->
MaxCount
);
TRACE
(
"variance = %ld
\n
"
,
pStubMsg
->
ActualCount
);
for
(
count
=
0
;
count
<
pStubMsg
->
ActualCount
;
count
++
)
count
=
pStubMsg
->
ActualCount
;
for
(
i
=
0
;
i
<
count
;
i
++
)
pMemory
=
ComplexFree
(
pStubMsg
,
pMemory
,
pFormat
,
NULL
);
}
...
...
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