1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r14176: Fix coverity bug #30. Ensure no possible null deref.

Jeremy.
This commit is contained in:
Jeremy Allison 2006-03-10 23:22:38 +00:00 committed by Gerald (Jerry) Carter
parent c0f906ac8d
commit e5d6069cf8

View File

@ -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 */