r15755: Fix Coverity bug # 294. Apparently password can be NULL, but cli_session_setup
authorVolker Lendecke <vlendec@samba.org>
Sat, 20 May 2006 18:30:09 +0000 (18:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:17:10 +0000 (11:17 -0500)
derefences it.

Volker
(This used to be commit b013b6908d22cfd38fcc56a9cb2ca675d75996d1)

source3/libsmb/cliconnect.c

index 2400f6ff1d9894b9a29abc3615c966f352294e5d..7f5b5d7fa57ba97c9c314064ccadecdb8d9da5b2 100644 (file)
@@ -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);