Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
cdc10a8d
Commit
cdc10a8d
authored
Nov 16, 2009
by
Rob Shearman
Committed by
Alexandre Julliard
Nov 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Don't crash with a NULL binding handle in RpcBindingFree.
parent
b49512ec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
rpc_binding.c
dlls/rpcrt4/rpc_binding.c
+5
-2
rpc.c
dlls/rpcrt4/tests/rpc.c
+12
-0
No files found.
dlls/rpcrt4/rpc_binding.c
View file @
cdc10a8d
...
...
@@ -785,8 +785,11 @@ RPC_STATUS WINAPI RpcBindingFree( RPC_BINDING_HANDLE* Binding )
{
RPC_STATUS
status
;
TRACE
(
"(%p) = %p
\n
"
,
Binding
,
*
Binding
);
status
=
RPCRT4_ReleaseBinding
(
*
Binding
);
if
(
status
==
RPC_S_OK
)
*
Binding
=
0
;
if
(
*
Binding
)
status
=
RPCRT4_ReleaseBinding
(
*
Binding
);
else
status
=
RPC_S_INVALID_BINDING
;
if
(
status
==
RPC_S_OK
)
*
Binding
=
NULL
;
return
status
;
}
...
...
dlls/rpcrt4/tests/rpc.c
View file @
cdc10a8d
...
...
@@ -800,6 +800,17 @@ static void test_UuidCreate(void)
}
}
static
void
test_RpcBindingFree
(
void
)
{
RPC_BINDING_HANDLE
binding
=
NULL
;
RPC_STATUS
status
;
status
=
RpcBindingFree
(
&
binding
);
ok
(
status
==
RPC_S_INVALID_BINDING
,
"RpcBindingFree should have retured RPC_S_INVALID_BINDING instead of %d
\n
"
,
status
);
}
START_TEST
(
rpc
)
{
UuidConversionAndComparison
();
...
...
@@ -811,4 +822,5 @@ START_TEST( rpc )
test_I_RpcExceptionFilter
();
test_RpcStringBindingFromBinding
();
test_UuidCreate
();
test_RpcBindingFree
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment