Commit 2d801c46 authored by Alexandre Julliard's avatar Alexandre Julliard

rpcrt4: Return the correct failure for a NULL binding handle.

Fixes a test crash in interpreted mode.
parent a2c20d0e
...@@ -346,9 +346,9 @@ static handle_t client_get_handle(const MIDL_STUB_MESSAGE *pStubMsg, ...@@ -346,9 +346,9 @@ static handle_t client_get_handle(const MIDL_STUB_MESSAGE *pStubMsg,
{ {
ERR("null context handle isn't allowed\n"); ERR("null context handle isn't allowed\n");
RpcRaiseException(RPC_X_SS_IN_NULL_CONTEXT); RpcRaiseException(RPC_X_SS_IN_NULL_CONTEXT);
return NULL;
} }
/* FIXME: should we store this structure in stubMsg.pContext? */ /* FIXME: should we store this structure in stubMsg.pContext? */
return NULL;
} }
default: default:
ERR("bad explicit binding handle type (0x%02x)\n", pProcHeader->handle_type); ERR("bad explicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
...@@ -745,10 +745,7 @@ static LONG_PTR do_ndr_client_call( const MIDL_STUB_DESC *stub_desc, const PFORM ...@@ -745,10 +745,7 @@ static LONG_PTR do_ndr_client_call( const MIDL_STUB_DESC *stub_desc, const PFORM
/* we only need a handle if this isn't an object method */ /* we only need a handle if this isn't an object method */
if (!(proc_header->Oi_flags & Oi_OBJECT_PROC)) if (!(proc_header->Oi_flags & Oi_OBJECT_PROC))
{
hbinding = client_get_handle(stub_msg, proc_header, handle_format); hbinding = client_get_handle(stub_msg, proc_header, handle_format);
if (!hbinding) return 0;
}
stub_msg->BufferLength = 0; stub_msg->BufferLength = 0;
......
...@@ -1638,7 +1638,7 @@ RPC_STATUS WINAPI I_RpcGetBuffer(PRPC_MESSAGE pMsg) ...@@ -1638,7 +1638,7 @@ RPC_STATUS WINAPI I_RpcGetBuffer(PRPC_MESSAGE pMsg)
if (!bind) if (!bind)
{ {
ERR("no binding\n"); WARN("no binding\n");
return RPC_S_INVALID_BINDING; return RPC_S_INVALID_BINDING;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment