rpcrt4: Don't copy memory from the buffer in NdrConformantStringUnmarshall if we just pointed the memory pointer into the buffer.
(Reported by Dan Kegel.)
This commit is contained in:
parent
8d6d9fd3ad
commit
b9c92e9564
|
@ -890,6 +890,7 @@ unsigned char *WINAPI NdrConformantStringUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
|
||||||
*ppMemory = NdrAllocate(pStubMsg, memsize);
|
*ppMemory = NdrAllocate(pStubMsg, memsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (*ppMemory != pStubMsg->Buffer)
|
||||||
safe_copy_from_buffer(pStubMsg, *ppMemory, bufsize);
|
safe_copy_from_buffer(pStubMsg, *ppMemory, bufsize);
|
||||||
|
|
||||||
if (*pFormat == RPC_FC_C_CSTRING) {
|
if (*pFormat == RPC_FC_C_CSTRING) {
|
||||||
|
|
Loading…
Reference in New Issue