diff options
author | Gerald Carter <jerry@samba.org> | 2006-03-15 14:58:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:15:30 -0500 |
commit | 0f0ad2992eedeb9e75ddd2c122b5a5b291ba4efe (patch) | |
tree | 38daed5eae95680fcacc9b8b6c9b7a540aee22c1 /source3/rpc_client | |
parent | 24961b173b53075100cf433bbc1c90485f376434 (diff) | |
download | samba-0f0ad2992eedeb9e75ddd2c122b5a5b291ba4efe.tar.gz samba-0f0ad2992eedeb9e75ddd2c122b5a5b291ba4efe.tar.bz2 samba-0f0ad2992eedeb9e75ddd2c122b5a5b291ba4efe.zip |
r14448: * protect against NULL cli_state* pointers in cli_rpc_pipe_open()
* Fix inverted logic check for machine accounts in get_md4pw()
(This used to be commit a36529535dcb5a262e7627b80fb62a31240dc8ad)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 45b2e96bac..a2e0dab990 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -2171,6 +2171,12 @@ static struct rpc_pipe_client *cli_rpc_pipe_open(struct cli_state *cli, int pipe *perr = NT_STATUS_NO_MEMORY; + /* sanity check to protect against crashes */ + + if ( !cli ) { + return NT_STATUS_INVALID_HANDLE; + } + /* The pipe name index must fall within our array */ SMB_ASSERT((pipe_idx >= 0) && (pipe_idx < PI_MAX_PIPES)); |