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 | ab43bf3e107d95b0d4e2ae41fb690dbf95bda846 (patch) | |
tree | 7e8eecb0194794b137236135610045804d43fd84 | |
parent | 5f224c2c265faa50e5495cc738f1a62c6aa70d56 (diff) | |
download | samba-ab43bf3e107d95b0d4e2ae41fb690dbf95bda846.tar.gz samba-ab43bf3e107d95b0d4e2ae41fb690dbf95bda846.tar.bz2 samba-ab43bf3e107d95b0d4e2ae41fb690dbf95bda846.zip |
r14176: Fix coverity bug #30. Ensure no possible null deref.
Jeremy.
(This used to be commit e5d6069cf88c0aa632af5582fcd7466729b20934)
-rw-r--r-- | source3/client/smbspool.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c index 245775bf6a..af2f7e9180 100644 --- a/source3/client/smbspool.c +++ b/source3/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 */ |