From 00ccbd2f39f93a88d5a8a9e02a757be29b8d3fb3 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Mon, 19 Dec 2022 16:13:58 +0100 Subject: [PATCH] [RPCRT4] RpcStringBindingParseA/W must fail, if a colon is missing in the string binding This fixes a bug in the rpc winetest. This patch will be sent upstream. --- dll/win32/rpcrt4/rpc_binding.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dll/win32/rpcrt4/rpc_binding.c b/dll/win32/rpcrt4/rpc_binding.c index 640e17673c6..80278b98570 100644 --- a/dll/win32/rpcrt4/rpc_binding.c +++ b/dll/win32/rpcrt4/rpc_binding.c @@ -601,6 +601,8 @@ RPC_STATUS WINAPI RpcStringBindingParseA( RPC_CSTR StringBinding, RPC_CSTR *ObjU if (next) { if (Protseq) *Protseq = unescape_string_binding_component(data, next - data); data = next+1; + } else { + goto fail; } next = string_binding_find_delimiter(data, '['); @@ -711,6 +713,8 @@ RPC_STATUS WINAPI RpcStringBindingParseW( RPC_WSTR StringBinding, RPC_WSTR *ObjU if (next) { if (Protseq) *Protseq = unescape_string_binding_componentW(data, next - data); data = next+1; + } else { + goto fail; } next = string_binding_find_delimiterW(data, '[');