s3-credentials: protect netlogon_creds_server_step() against NULL creds.
authorGuenther Deschner <gd@samba.org>
Thu, 7 May 2009 19:53:00 +0000 (12:53 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 2 Jun 2009 10:41:55 +0000 (12:41 +0200)
Found by SCHANNEL torture tests.

Guenther
(cherry picked from commit c578c66569eed3ae19b42c9787399eb70b935e0a)

source/libsmb/credentials.c

index 9d33e6d93d7298070da5092a409f71e6a60bcdac..4bfa2318c44820790ba633d7c83e8ceeb470b400 100644 (file)
@@ -255,6 +255,10 @@ bool netlogon_creds_server_step(struct dcinfo *dc,
        bool ret;
        struct dcinfo tmp_dc = *dc;
 
+       if (!received_cred || !cred_out) {
+               return false;
+       }
+
        /* Do all operations on a temporary copy of the dc,
           which we throw away if the checks fail. */