Rob Shearman : rpcrt4: Move forcing of fMustAlloc to NULL to the callers of EmbeddedPointerUnmarshall .
Alexandre Julliard
julliard at winehq.org
Fri Nov 30 07:56:20 CST 2007
Module: wine
Branch: master
Commit: 4e8f69ac2d8d7edc8f68068e23d1a161f8f06662
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4e8f69ac2d8d7edc8f68068e23d1a161f8f06662
Author: Rob Shearman <rob at codeweavers.com>
Date: Thu Nov 29 17:35:29 2007 +0000
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.
---
dlls/rpcrt4/ndr_marshall.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index 9394251..f665f1c 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -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;
}
More information about the wine-cvs
mailing list