From ab43bf3e107d95b0d4e2ae41fb690dbf95bda846 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 10 Mar 2006 23:22:38 +0000 Subject: [PATCH] r14176: Fix coverity bug #30. Ensure no possible null deref. Jeremy. (This used to be commit e5d6069cf88c0aa632af5582fcd7466729b20934) --- source3/client/smbspool.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c index 245775bf6ae..af2f7e9180c 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 */ -- 2.11.4.GIT