rpcrt4: Fix buffer size calculation for arrays with embedded pointers.

This commit is contained in:
Eric Kohl 2014-09-18 14:22:20 +02:00 committed by Alexandre Julliard
parent 57f1d4489f
commit 23981241c1
1 changed files with 3 additions and 3 deletions

View File

@ -1211,7 +1211,7 @@ static unsigned char * EmbeddedPointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
unsigned char *bufptr = bufbase + *(const SHORT*)&info[2];
unsigned char *saved_memory = pStubMsg->Memory;
pStubMsg->Memory = pMemory;
pStubMsg->Memory = membase;
PointerMarshall(pStubMsg, bufptr, *(unsigned char**)memptr, info+4);
pStubMsg->Memory = saved_memory;
}
@ -1365,7 +1365,7 @@ static void EmbeddedPointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
unsigned char *memptr = membase + *(const SHORT*)&info[0];
unsigned char *saved_memory = pStubMsg->Memory;
pStubMsg->Memory = pMemory;
pStubMsg->Memory = membase;
PointerBufferSize(pStubMsg, *(unsigned char**)memptr, info+4);
pStubMsg->Memory = saved_memory;
}
@ -1497,7 +1497,7 @@ static void EmbeddedPointerFree(PMIDL_STUB_MESSAGE pStubMsg,
unsigned char *memptr = membase + *(const SHORT*)&info[0];
unsigned char *saved_memory = pStubMsg->Memory;
pStubMsg->Memory = pMemory;
pStubMsg->Memory = membase;
PointerFree(pStubMsg, *(unsigned char**)memptr, info+4);
pStubMsg->Memory = saved_memory;
}