rpcrt4: Fix memory sizes of marshalled pointers on 64-bit.

This commit is contained in:
Alexandre Julliard 2009-06-19 12:49:35 +02:00
parent 39d75dfba4
commit b579c48133
1 changed files with 8 additions and 8 deletions

View File

@ -1562,7 +1562,7 @@ ULONG WINAPI NdrPointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
ALIGN_POINTER(pStubMsg->Buffer, 4); ALIGN_POINTER(pStubMsg->Buffer, 4);
safe_buffer_increment(pStubMsg, 4); safe_buffer_increment(pStubMsg, 4);
} }
ALIGN_LENGTH(pStubMsg->MemorySize, 4); ALIGN_LENGTH(pStubMsg->MemorySize, sizeof(void *));
return PointerMemorySize(pStubMsg, Buffer, pFormat); return PointerMemorySize(pStubMsg, Buffer, pFormat);
} }
@ -2724,7 +2724,7 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg,
} }
TRACE("pStubMsg->Buffer after %p\n", pStubMsg->Buffer); TRACE("pStubMsg->Buffer after %p\n", pStubMsg->Buffer);
pPointer += 4; pPointer += 4;
pMemory += 4; pMemory += sizeof(void *);
break; break;
} }
case RPC_FC_ALIGNM4: case RPC_FC_ALIGNM4:
@ -2849,7 +2849,7 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
safe_buffer_increment(pStubMsg, 4); /* for pointer ID */ safe_buffer_increment(pStubMsg, 4); /* for pointer ID */
} }
pPointer += 4; pPointer += 4;
pMemory += 4; pMemory += sizeof(void *);
break; break;
} }
case RPC_FC_ALIGNM4: case RPC_FC_ALIGNM4:
@ -2964,7 +2964,7 @@ static unsigned char * ComplexBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
safe_buffer_length_increment(pStubMsg, 4); safe_buffer_length_increment(pStubMsg, 4);
} }
pPointer += 4; pPointer += 4;
pMemory += 4; pMemory += sizeof(void*);
break; break;
case RPC_FC_ALIGNM4: case RPC_FC_ALIGNM4:
ALIGN_POINTER(pMemory, 4); ALIGN_POINTER(pMemory, 4);
@ -3047,7 +3047,7 @@ static unsigned char * ComplexFree(PMIDL_STUB_MESSAGE pStubMsg,
case RPC_FC_POINTER: case RPC_FC_POINTER:
NdrPointerFree(pStubMsg, *(unsigned char**)pMemory, pPointer); NdrPointerFree(pStubMsg, *(unsigned char**)pMemory, pPointer);
pPointer += 4; pPointer += 4;
pMemory += 4; pMemory += sizeof(void *);
break; break;
case RPC_FC_ALIGNM4: case RPC_FC_ALIGNM4:
ALIGN_POINTER(pMemory, 4); ALIGN_POINTER(pMemory, 4);
@ -3158,7 +3158,7 @@ static ULONG ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
safe_buffer_increment(pStubMsg, 4); /* for pointer ID */ safe_buffer_increment(pStubMsg, 4); /* for pointer ID */
} }
pPointer += 4; pPointer += 4;
size += 4; size += sizeof(void *);
break; break;
} }
case RPC_FC_ALIGNM4: case RPC_FC_ALIGNM4:
@ -5684,8 +5684,8 @@ static ULONG union_arm_memory_size(PMIDL_STUB_MESSAGE pStubMsg,
ALIGN_POINTER(pStubMsg->Buffer, 4); ALIGN_POINTER(pStubMsg->Buffer, 4);
saved_buffer = pStubMsg->Buffer; saved_buffer = pStubMsg->Buffer;
safe_buffer_increment(pStubMsg, 4); safe_buffer_increment(pStubMsg, 4);
ALIGN_LENGTH(pStubMsg->MemorySize, 4); ALIGN_LENGTH(pStubMsg->MemorySize, sizeof(void *));
pStubMsg->MemorySize += 4; pStubMsg->MemorySize += sizeof(void *);
if (!pStubMsg->IgnoreEmbeddedPointers) if (!pStubMsg->IgnoreEmbeddedPointers)
PointerMemorySize(pStubMsg, saved_buffer, pFormat); PointerMemorySize(pStubMsg, saved_buffer, pFormat);
break; break;