mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
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.
This commit is contained in:
parent
54e904e780
commit
498216fc11
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue