Commit ee5cada2 authored by Alexandre Julliard's avatar Alexandre Julliard

rpcrt4: Don't align the buffer after reading the conformance, we need to read the variance first.

parent 17bc7be5
...@@ -2062,7 +2062,6 @@ static inline ULONG array_read_conformance( ...@@ -2062,7 +2062,6 @@ static inline ULONG array_read_conformance(
unsigned char fc, PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat) unsigned char fc, PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
{ {
DWORD def, esize; DWORD def, esize;
unsigned char alignment;
switch (fc) switch (fc)
{ {
...@@ -2087,7 +2086,6 @@ static inline ULONG array_read_conformance( ...@@ -2087,7 +2086,6 @@ static inline ULONG array_read_conformance(
ReadConformance(pStubMsg, NULL); ReadConformance(pStubMsg, NULL);
return safe_multiply(esize, pStubMsg->MaxCount); return safe_multiply(esize, pStubMsg->MaxCount);
case RPC_FC_BOGUS_ARRAY: case RPC_FC_BOGUS_ARRAY:
alignment = pFormat[1] + 1;
def = *(const WORD *)(pFormat + 2); def = *(const WORD *)(pFormat + 2);
pFormat += 4; pFormat += 4;
if (IsConformanceOrVariancePresent(pFormat)) pFormat = ReadConformance(pStubMsg, pFormat); if (IsConformanceOrVariancePresent(pFormat)) pFormat = ReadConformance(pStubMsg, pFormat);
...@@ -2098,7 +2096,6 @@ static inline ULONG array_read_conformance( ...@@ -2098,7 +2096,6 @@ static inline ULONG array_read_conformance(
} }
pFormat = SkipVariance( pStubMsg, pFormat ); pFormat = SkipVariance( pStubMsg, pFormat );
align_pointer(&pStubMsg->Buffer, alignment);
esize = ComplexStructSize(pStubMsg, pFormat); esize = ComplexStructSize(pStubMsg, pFormat);
return safe_multiply(pStubMsg->MaxCount, esize); return safe_multiply(pStubMsg->MaxCount, esize);
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment