Commit 9a888e64 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

rpcrt4: Fix NdrConformantStringUnmarshall to always increment the buffer during unmarshalling.

safe_copy_from_buffer has the side-effect of incrementing the buffer and this still needs to be done when we point the memory into the buffer. (Thanks to Maarten Lankhorst for finding the mistake and suggesting a fix.)
parent aaa0e509
......@@ -890,7 +890,9 @@ unsigned char *WINAPI NdrConformantStringUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
*ppMemory = NdrAllocate(pStubMsg, memsize);
}
if (*ppMemory != pStubMsg->Buffer)
if (*ppMemory == pStubMsg->Buffer)
safe_buffer_increment(pStubMsg, bufsize);
else
safe_copy_from_buffer(pStubMsg, *ppMemory, bufsize);
if (*pFormat == RPC_FC_C_CSTRING) {
......
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