Commit 498216fc authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

rpcrt4: Fix crash in rpcrt4_ncalrpc_parse_top_of_tower due to unconditionally…

rpcrt4: Fix crash in rpcrt4_ncalrpc_parse_top_of_tower due to unconditionally dereferencing networkaddr and endpoint variables. These can be NULL when parts of the tower are not required.
parent 54e904e7
......@@ -706,9 +706,6 @@ static RPC_STATUS rpcrt4_ncalrpc_parse_top_of_tower(const unsigned char *tower_d
TRACE("(%p, %d, %p, %p)\n", tower_data, (int)tower_size, networkaddr, endpoint);
*networkaddr = NULL;
*endpoint = NULL;
if (tower_size < sizeof(*pipe_floor))
return EPT_S_NOT_REGISTERED;
......@@ -720,6 +717,9 @@ static RPC_STATUS rpcrt4_ncalrpc_parse_top_of_tower(const unsigned char *tower_d
(pipe_floor->count_rhs > tower_size))
return EPT_S_NOT_REGISTERED;
if (networkaddr)
*networkaddr = NULL;
if (endpoint)
{
*endpoint = I_RpcAllocate(pipe_floor->count_rhs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment