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

Fixes a test crash in interpreted mode.
This commit is contained in:
Alexandre Julliard 2024-03-28 11:24:46 +01:00
parent a2c20d0e93
commit 2d801c46c7
2 changed files with 2 additions and 5 deletions

View file

@ -346,9 +346,9 @@ static handle_t client_get_handle(const MIDL_STUB_MESSAGE *pStubMsg,
{
ERR("null context handle isn't allowed\n");
RpcRaiseException(RPC_X_SS_IN_NULL_CONTEXT);
return NULL;
}
/* FIXME: should we store this structure in stubMsg.pContext? */
return NULL;
}
default:
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
/* we only need a handle if this isn't an object method */
if (!(proc_header->Oi_flags & Oi_OBJECT_PROC))
{
hbinding = client_get_handle(stub_msg, proc_header, handle_format);
if (!hbinding) return 0;
}
stub_msg->BufferLength = 0;

View file

@ -1638,7 +1638,7 @@ RPC_STATUS WINAPI I_RpcGetBuffer(PRPC_MESSAGE pMsg)
if (!bind)
{
ERR("no binding\n");
WARN("no binding\n");
return RPC_S_INVALID_BINDING;
}