rpcrt4: The arm type mask should be comparing the highest byte against 0x80, as documented on MSDN.
Fix base type arm handling on little-endian machines, as the current code would always pass in the address to the format char of 0x80 instead of the base type format char.
This commit is contained in:
parent
5cdfeeeed3
commit
07d032b24b
|
@ -3074,10 +3074,10 @@ unsigned char * WINAPI NdrNonEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE pStub
|
|||
return NULL;
|
||||
|
||||
type = *(const unsigned short*)pFormat;
|
||||
if(type & 0x8000)
|
||||
if((type & 0xff00) == 0x8000)
|
||||
{
|
||||
pFormat++;
|
||||
return NdrBaseTypeMarshall(pStubMsg, pMemory, pFormat);
|
||||
unsigned char basetype = LOBYTE(type);
|
||||
return NdrBaseTypeMarshall(pStubMsg, pMemory, &basetype);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3171,10 +3171,10 @@ unsigned char * WINAPI NdrNonEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE pSt
|
|||
*ppMemory = NdrAllocate(pStubMsg, size);
|
||||
|
||||
type = *(const unsigned short*)pFormat;
|
||||
if(type & 0x8000)
|
||||
if((type & 0xff00) == 0x8000)
|
||||
{
|
||||
pFormat++;
|
||||
return NdrBaseTypeUnmarshall(pStubMsg, ppMemory, pFormat, fMustAlloc);
|
||||
unsigned char basetype = LOBYTE(type);
|
||||
return NdrBaseTypeUnmarshall(pStubMsg, ppMemory, &basetype, fMustAlloc);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3218,10 +3218,10 @@ void WINAPI NdrNonEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
|
|||
return;
|
||||
|
||||
type = *(const unsigned short*)pFormat;
|
||||
if(type & 0x8000)
|
||||
if((type & 0xff00) == 0x8000)
|
||||
{
|
||||
pFormat++;
|
||||
NdrBaseTypeBufferSize(pStubMsg, pMemory, pFormat);
|
||||
unsigned char basetype = LOBYTE(type);
|
||||
NdrBaseTypeBufferSize(pStubMsg, pMemory, &basetype);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue