Module: wine Branch: master Commit: 182a2ae3150cdf0defd8c85c021175d1238901ca URL: http://source.winehq.org/git/wine.git/?a=commit;h=182a2ae3150cdf0defd8c85c02...
Author: Rob Shearman robertshearman@gmail.com Date: Tue Jul 1 23:34:12 2008 +0100
rpcrt4: Reset the BufferLength to the used part of the buffer in NdrProxySendReceive.
This avoids sending uninitialised data on the wire.
---
dlls/rpcrt4/cproxy.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c index 6ddaccd..8272679 100644 --- a/dlls/rpcrt4/cproxy.c +++ b/dlls/rpcrt4/cproxy.c @@ -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);