Module: wine Branch: master Commit: 498216fc117b56d605339b4cb368bdc1fca20aeb URL: http://source.winehq.org/git/wine.git/?a=commit;h=498216fc117b56d605339b4cb3...
Author: Rob Shearman robertshearman@gmail.com Date: Sun Aug 10 18:23:40 2008 +0100
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.
---
dlls/rpcrt4/rpc_transport.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 6e57ee7..9d70088 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -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);