summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-05-20 18:30:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:10 -0500
commit824ba94fbe2e25efdd63e15342e14f4a9e078357 (patch)
treede1cab1cb43c05278dd44490fc5ce1af91522db5 /source3/libsmb
parent4856cd51f055afc703445ba18f5eb0794f09d8b6 (diff)
downloadsamba-824ba94fbe2e25efdd63e15342e14f4a9e078357.tar.gz
samba-824ba94fbe2e25efdd63e15342e14f4a9e078357.tar.bz2
samba-824ba94fbe2e25efdd63e15342e14f4a9e078357.zip
r15755: Fix Coverity bug # 294. Apparently password can be NULL, but cli_session_setup
derefences it. Volker (This used to be commit b013b6908d22cfd38fcc56a9cb2ca675d75996d1)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 2400f6ff1d..7f5b5d7fa5 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -1495,6 +1495,10 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli,
struct cli_state *cli = NULL;
int pw_len = password ? strlen(password)+1 : 0;
+ if (password == NULL) {
+ password = "";
+ }
+
nt_status = cli_start_connection(&cli, my_name, dest_host,
dest_ip, port, signing_state, flags, retry);