Rob Shearman : rpcrt4: A NULL IfSpec in RpcServerUnregisterIf should remove all interfaces, not crash.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jan 2 14:17:32 CST 2007


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Tue Jan  2 15:39:54 2007 +0000

rpcrt4: A NULL IfSpec in RpcServerUnregisterIf should remove all interfaces, not crash.

---

 dlls/rpcrt4/rpc_server.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c
index 50549ea..285ef09 100644
--- a/dlls/rpcrt4/rpc_server.c
+++ b/dlls/rpcrt4/rpc_server.c
@@ -831,7 +831,7 @@ RPC_STATUS WINAPI RpcServerUnregisterIf(
 
   EnterCriticalSection(&server_cs);
   LIST_FOR_EACH_ENTRY(cif, &server_interfaces, RpcServerInterface, entry) {
-    if (!memcmp(&If->InterfaceId, &cif->If->InterfaceId, sizeof(RPC_SYNTAX_IDENTIFIER)) &&
+    if ((!IfSpec || !memcmp(&If->InterfaceId, &cif->If->InterfaceId, sizeof(RPC_SYNTAX_IDENTIFIER))) &&
         UuidEqual(MgrTypeUuid, &cif->MgrTypeUuid, &status)) {
       list_remove(&cif->entry);
       if (cif->CurrentCalls) {




More information about the wine-cvs mailing list