diff options
author | Jeremy Allison <jra@samba.org> | 2006-03-10 23:22:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:15:15 -0500 |
commit | e5d6069cf88c0aa632af5582fcd7466729b20934 (patch) | |
tree | 30c6046e69129d3781ff1becbfa40362b2da8a8d /source/client | |
parent | c0f906ac8de850f4566b6b3be4e3c7d245e6e252 (diff) | |
download | samba-e5d6069cf88c0aa632af5582fcd7466729b20934.tar.gz samba-e5d6069cf88c0aa632af5582fcd7466729b20934.tar.xz samba-e5d6069cf88c0aa632af5582fcd7466729b20934.zip |
r14176: Fix coverity bug #30. Ensure no possible null deref.
Jeremy.
Diffstat (limited to 'source/client')
-rw-r--r-- | source/client/smbspool.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/client/smbspool.c b/source/client/smbspool.c index 245775bf6ae..af2f7e9180c 100644 --- a/source/client/smbspool.c +++ b/source/client/smbspool.c @@ -375,9 +375,14 @@ static struct cli_state return NULL; } - + /* We pretty much guarentee password must be valid or a pointer + to a 0 char. */ + if (!password) { + return NULL; + } + if ( (username) && (*username) && - ((!password) || ((password) && (strlen(password) == 0 ))) && + (strlen(password) == 0 ) && (cli->use_kerberos) ) { /* Use kerberos authentication */ |