svn commit: samba r14177 - in trunk/source/client: .
jra at samba.org
jra at samba.org
Fri Mar 10 23:22:45 GMT 2006
Author: jra
Date: 2006-03-10 23:22:44 +0000 (Fri, 10 Mar 2006)
New Revision: 14177
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14177
Log:
Fix coverity bug #30. Ensure no possible null deref.
Jeremy.
Modified:
trunk/source/client/smbspool.c
Changeset:
Modified: trunk/source/client/smbspool.c
===================================================================
--- trunk/source/client/smbspool.c 2006-03-10 23:22:38 UTC (rev 14176)
+++ trunk/source/client/smbspool.c 2006-03-10 23:22:44 UTC (rev 14177)
@@ -375,9 +375,14 @@
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 */
More information about the samba-cvs
mailing list