Module: wine Branch: master Commit: 2d801c46c76bbf6fa9fed9988222aa5cfb249b57 URL: https://gitlab.winehq.org/wine/wine/-/commit/2d801c46c76bbf6fa9fed9988222aa5...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Mar 28 11:24:46 2024 +0100
rpcrt4: Return the correct failure for a NULL binding handle.
Fixes a test crash in interpreted mode.
---
dlls/rpcrt4/ndr_stubless.c | 5 +---- dlls/rpcrt4/rpc_message.c | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index 7aa2f79d10b..cb77b8a06d3 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -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;
diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c index 46736c21fc1..5ef2ee8edc5 100644 --- a/dlls/rpcrt4/rpc_message.c +++ b/dlls/rpcrt4/rpc_message.c @@ -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; }