diff options
author | Jeremy Allison <jra@samba.org> | 2006-03-10 23:22:38 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2006-03-10 23:22:38 +0000 |
commit | f1ca89ac17e3b239f17deff76484fa5107c60018 (patch) | |
tree | 30c6046e69129d3781ff1becbfa40362b2da8a8d /source/client | |
parent | 9269e3a38de80c268c5de7d64a52550b7b253e44 (diff) | |
download | samba-f1ca89ac17e3b239f17deff76484fa5107c60018.tar.gz samba-f1ca89ac17e3b239f17deff76484fa5107c60018.tar.xz samba-f1ca89ac17e3b239f17deff76484fa5107c60018.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 */ |