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.)
This commit is contained in:
parent
aaa0e5090a
commit
9a888e6465
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue