Commit 4e8f69ac authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

rpcrt4: Move forcing of fMustAlloc to NULL to the callers of EmbeddedPointerUnmarshall.

This will enable them to be individually fixed up to use memory if it was provided by the caller.
parent 43e0c67f
......@@ -1322,7 +1322,7 @@ static unsigned char * EmbeddedPointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
for (u=0; u<count; u++,info+=8) {
unsigned char *memptr = membase + *(const SHORT*)&info[0];
unsigned char *bufptr = bufbase + *(const SHORT*)&info[2];
PointerUnmarshall(pStubMsg, bufptr, (unsigned char**)memptr, info+4, TRUE);
PointerUnmarshall(pStubMsg, bufptr, (unsigned char**)memptr, info+4, fMustAlloc);
}
}
pFormat += 8 * count;
......@@ -1692,7 +1692,7 @@ unsigned char * WINAPI NdrSimpleStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
}
if (pFormat[0] != RPC_FC_STRUCT)
EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat+4, fMustAlloc);
EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat+4, TRUE /* FIXME */);
return NULL;
}
......@@ -2579,7 +2579,7 @@ unsigned char * WINAPI NdrConformantArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
pStubMsg->BufferMark = pStubMsg->Buffer;
safe_copy_from_buffer(pStubMsg, *ppMemory, size);
EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat, fMustAlloc);
EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat, TRUE /* FIXME */);
return NULL;
}
......@@ -2723,7 +2723,7 @@ unsigned char* WINAPI NdrConformantVaryingArrayUnmarshall( PMIDL_STUB_MESSAGE pS
*ppMemory = NdrAllocate(pStubMsg, memsize);
safe_copy_from_buffer(pStubMsg, *ppMemory + pStubMsg->Offset, bufsize);
EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat, fMustAlloc);
EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat, TRUE /* FIXME */);
return NULL;
}
......@@ -3471,7 +3471,7 @@ unsigned char * WINAPI NdrConformantStructUnmarshall(PMIDL_STUB_MESSAGE pStubMs
safe_copy_from_buffer(pStubMsg, *ppMemory, pCStructFormat->memory_size + bufsize);
if (pCStructFormat->type == RPC_FC_CPSTRUCT)
EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat, fMustAlloc);
EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat, TRUE /* FIXME */);
return NULL;
}
......@@ -3721,7 +3721,7 @@ unsigned char * WINAPI NdrConformantVaryingStructUnmarshall(PMIDL_STUB_MESSAGE
else if (cvarray_type == RPC_FC_C_WSTRING)
TRACE("string=%s\n", debugstr_w((WCHAR *)(*ppMemory + pCVStructFormat->memory_size)));
EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat, fMustAlloc);
EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat, TRUE /* FIXME */);
return NULL;
}
......@@ -4025,7 +4025,7 @@ unsigned char * WINAPI NdrFixedArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
pStubMsg->BufferMark = pStubMsg->Buffer;
safe_copy_from_buffer(pStubMsg, *ppMemory, total_size);
pFormat = EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat, fMustAlloc);
pFormat = EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat, TRUE /* FIXME */);
return NULL;
}
......@@ -4255,7 +4255,7 @@ unsigned char * WINAPI NdrVaryingArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
*ppMemory = NdrAllocate(pStubMsg, size);
safe_copy_from_buffer(pStubMsg, *ppMemory + pStubMsg->Offset, bufsize);
EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat, fMustAlloc);
EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, pFormat, TRUE /* FIXME */);
return NULL;
}
......
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