https://git.reactos.org/?p=reactos.git;a=commitdiff;h=00ccbd2f39f93a88d5a8a…
commit 00ccbd2f39f93a88d5a8a9e02a757be29b8d3fb3
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Mon Dec 19 16:13:58 2022 +0100
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Mon Dec 19 16:13:58 2022 +0100
[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, '[');