rpcrt4: Reset the BufferLength to the used part of the buffer in NdrProxySendReceive.

This avoids sending uninitialised data on the wire.
This commit is contained in:
Rob Shearman 2008-07-01 23:34:12 +01:00 committed by Alexandre Julliard
parent d5a8875b93
commit 182a2ae315
1 changed files with 2 additions and 0 deletions

View File

@ -385,6 +385,8 @@ void WINAPI NdrProxySendReceive(void *This,
}
pStubMsg->dwStubPhase = PROXY_SENDRECEIVE;
/* avoid sending uninitialised parts of the buffer on the wire */
pStubMsg->RpcMsg->BufferLength = pStubMsg->Buffer - (unsigned char *)pStubMsg->RpcMsg->Buffer;
hr = IRpcChannelBuffer_SendReceive(pStubMsg->pRpcChannelBuffer,
(RPCOLEMESSAGE*)pStubMsg->RpcMsg,
&Status);