Fix Coverity ID 870
authorVolker Lendecke <vl@samba.org>
Tue, 3 Feb 2009 09:21:51 +0000 (10:21 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 3 Feb 2009 09:22:36 +0000 (10:22 +0100)
source3/libsmb/cliconnect.c

index 60b1a6027c33157c4699832aa42217e1bbe0e5d8..a39e035d2acd810877df64cad06b165bb3a28a49 100644 (file)
@@ -1229,6 +1229,10 @@ struct async_req *cli_tcon_andx_send(TALLOC_CTX *mem_ctx,
                         */
                        passlen = clistr_push(cli, pword, pass, sizeof(pword),
                                              STR_TERMINATE);
+                       if (passlen == -1) {
+                               DEBUG(1, ("clistr_push(pword) failed\n"));
+                               goto access_denied;
+                       }
                } else {
                        if (passlen) {
                                memcpy(pword, pass, passlen);