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

Rob Shearman robertshearman at gmail.com
Tue Jul 1 17:34:12 CDT 2008


This avoids sending uninitialised data on the wire.
---
 dlls/rpcrt4/cproxy.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Fixes the following Valgrind warning in dlls/qmgr/tests:
+ Syscall param write(buf) points to uninitialised byte(s)
+    at  (within /lib/ld-2.7.so)
+    by  WriteFile (file.c:559)
+    by  rpcrt4_conn_np_write (rpc_transport.c:404)
+    by  rpcrt4_conn_write (rpc_binding.h:168)
+    by  RPCRT4_SendWithAuth (rpc_message.c:533)
+    by  RPCRT4_Send (rpc_message.c:675)
+    by  I_RpcSend (rpc_message.c:1225)
+    by  I_RpcSendReceive (rpc_message.c:1328)
+    by  rpc_sendreceive_thread (rpc.c:772)
+    by  worker_thread_proc (threadpool.c:113)
+    by  ??? (thread.c:128)
+    by  call_thread_func (thread.c:383)
+    by  start_thread (thread.c:443)
+    by  start_thread (in /lib/tls/i686/cmov/libpthread-2.7.so)
+    by  clone (in /lib/tls/i686/cmov/libc-2.7.so)
+  Address 0x7f01632c is 100 bytes inside a block of size 124 alloc'd
+    at  notify_alloc (heap.c:191)
+    by  RtlAllocateHeap (heap.c:1231)
+    by  RPCRT4_SendWithAuth (rpc_message.c:492)
+    by  RPCRT4_Send (rpc_message.c:675)
+    by  I_RpcSend (rpc_message.c:1225)
+    by  I_RpcSendReceive (rpc_message.c:1328)
+    by  rpc_sendreceive_thread (rpc.c:772)
+    by  worker_thread_proc (threadpool.c:113)
+    by  ??? (thread.c:128)
+    by  call_thread_func (thread.c:383)
+    by  start_thread (thread.c:443)
+    by  start_thread (in /lib/tls/i686/cmov/libpthread-2.7.so)
+    by  clone (in /lib/tls/i686/cmov/libc-2.7.so)
+  Uninitialised value was created by a client request
+    at  mark_block_uninitialized (heap.c:164)
+    by  RtlAllocateHeap (heap.c:1239)
+    by  I_RpcAllocate (rpcrt4_main.c:694)
+    by  I_RpcGetBuffer (rpc_message.c:1070)
+    by  ClientRpcChannelBuffer_GetBuffer (rpc.c:699)
+    by  NdrProxyGetBuffer (cproxy.c:355)
+    by  IBackgroundCopyManager_CreateJob_Proxy (qmgrprxy_p.c:6759)
+    by  setup (enum_jobs.c:57)
+    by  func_enum_jobs (enum_jobs.c:314)
+    by  run_test (test.h:449)
+    by  main (test.h:498)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4010c448ac4b58d23c36909db1d3c6acbb529347.diff
Type: text/x-patch
Size: 622 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080701/d2b92c8c/attachment-0001.bin 


More information about the wine-patches mailing list