git.samba.org
/
kai
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f224c2
)
r14176: Fix coverity bug #30. Ensure no possible null deref.
author
Jeremy Allison
<jra@samba.org>
Fri, 10 Mar 2006 23:22:38 +0000
(23:22 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 16:15:15 +0000
(11:15 -0500)
Jeremy.
(This used to be commit
e5d6069cf88c0aa632af5582fcd7466729b20934
)
source3/client/smbspool.c
patch
|
blob
|
history
diff --git
a/source3/client/smbspool.c
b/source3/client/smbspool.c
index 245775bf6ae2b730dda9a917b6f913f3bb6a2efc..af2f7e9180c7eea2087b3001b62178ee2f94a4d0 100644
(file)
--- 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 */