1. 20 Oct, 2022 1 commit
  2. 11 Oct, 2022 2 commits
    • Kevin Puetz's avatar
      rpcrt4: Add a refcount owned by MIDL_STUB_MESSAGE. · a7be4256
      Kevin Puetz authored
      In cases where this could have been use-after-free, exceptions were
      caught/hidden by RpcTryFinally, but still lead to leaks since
      NdrProxyFreeBuffer wasn't able to call IRPCChannelBuffer::FreeBuffer.
      
      StdProxy_GetChannel() now AddRef() on its return value (used to set
      __proxy_frame::_StubMsg::pRpcChannelBuffer), and NdrProxyFreeBuffer()
      calls the corresponding Release() and clears the now-weak pointer.
      This makes the behavior of these function match the observed test
      results, and fixes the crash/leak when a proxy is released mid-Invoke.
      a7be4256
    • Kevin Puetz's avatar
      rpcrt4/tests: Add tests for lifetime of IRpcChannelBuffer. · 59f39b32
      Kevin Puetz authored
      It's possible for a proxy to be released during the middle of an Invoke.
      E.g. a specific case where this happened was a single-shot event sink
      which, upon receiving the event it was waiting for, would immediately
      call DispEventUnadvise. This removed the proxy pointing to that sink
      from the connection point's list of subscribers and released the last
      refcount on the proxy itself.
      
      Therefore, all state used to complete an RPC call must be on the stack;
      once NdrProxySendReceive pumps STA messages and permits reentrancy,
      the proxy cannot be accessed or relied on to own anything.
      
      Add test showing MIDL_STUB_MESSAGE::pRpcChannelBuffer owns a refcount
      (to ensure it can read [out] parameters from the channel)
      59f39b32
  3. 04 Mar, 2022 1 commit
  4. 30 Oct, 2019 1 commit
  5. 17 Sep, 2018 2 commits
  6. 11 Jun, 2018 1 commit
  7. 03 Nov, 2016 2 commits
  8. 24 Apr, 2015 1 commit
  9. 24 Oct, 2014 1 commit
  10. 08 Nov, 2013 1 commit
  11. 15 Mar, 2011 1 commit
  12. 09 Feb, 2011 1 commit
  13. 08 Apr, 2010 1 commit
  14. 14 Dec, 2009 1 commit
  15. 24 Sep, 2009 1 commit
  16. 05 Jun, 2009 1 commit
  17. 03 Jun, 2009 1 commit
  18. 27 May, 2009 1 commit
  19. 16 Feb, 2009 1 commit
  20. 06 Feb, 2009 1 commit
  21. 02 Feb, 2009 1 commit
  22. 29 Jan, 2009 1 commit
  23. 16 Dec, 2008 1 commit
  24. 12 Sep, 2008 1 commit
  25. 08 Jul, 2008 1 commit
  26. 09 Jan, 2008 1 commit
  27. 04 Dec, 2007 1 commit
  28. 08 Jan, 2007 1 commit
  29. 14 Dec, 2006 1 commit
  30. 11 Dec, 2006 1 commit
  31. 08 Nov, 2006 1 commit
  32. 09 Oct, 2006 1 commit
  33. 02 Oct, 2006 1 commit
  34. 29 Sep, 2006 1 commit
  35. 07 Sep, 2006 2 commits
  36. 29 Aug, 2006 1 commit
    • Huw Davies's avatar
      rpcrt4: Add a test for IRpcStubBuffer_Connect on a delegated stub. · d28698dd
      Huw Davies authored
      This shows that we have a vtbl ptr at (void**)This-2 that is passed to
      the base interface's IRpcStubBuffer_Connect.  This vtbl should
      presumably forward calls to the real object's vtbl.  We can't simply
      pass the real object to the base interface's stub, as the real
      object's QI may not provide us with the base interface.
      d28698dd