Rob Shearman : rpcrt4: Fix a crash in RPCRT4_OpenBinding that can occur if

Alexandre Julliard julliard at wine.codeweavers.com
Wed Nov 15 05:37:37 CST 2006


Module: wine
Branch: master
Commit: 8e178b2d4f250f248965d9054c28725111cd337b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8e178b2d4f250f248965d9054c28725111cd337b

Author: Rob Shearman <rob at codeweavers.com>
Date:   Wed Nov 15 01:00:01 2006 +0000

rpcrt4: Fix a crash in RPCRT4_OpenBinding that can occur if
RPCRT4_CreateConnection fails by checking the return value from the
function and returning in this case.

---

 dlls/rpcrt4/rpc_binding.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c
index 21d78c5..c8368ff 100644
--- a/dlls/rpcrt4/rpc_binding.c
+++ b/dlls/rpcrt4/rpc_binding.c
@@ -255,9 +255,13 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding
   }
   
   /* create a new connection */
-  RPCRT4_CreateConnection(&NewConnection, Binding->server, Binding->Protseq,
-                          Binding->NetworkAddr, Binding->Endpoint, NULL,
-                          Binding->AuthInfo, Binding);
+  status = RPCRT4_CreateConnection(&NewConnection, Binding->server,
+                                   Binding->Protseq, Binding->NetworkAddr,
+                                   Binding->Endpoint, NULL, Binding->AuthInfo,
+                                   Binding);
+  if (status != RPC_S_OK)
+    return status;
+
   status = RPCRT4_OpenClientConnection(NewConnection);
   if (status != RPC_S_OK)
   {




More information about the wine-cvs mailing list