s3-credentials: protect netlogon_creds_server_step() against NULL creds.
authorGünther Deschner <gd@samba.org>
Thu, 7 May 2009 11:32:41 +0000 (13:32 +0200)
committerGünther Deschner <gd@samba.org>
Thu, 7 May 2009 11:32:41 +0000 (13:32 +0200)
Found by SCHANNEL torture tests.

Guenther

source3/libsmb/credentials.c

index 0d7bde0c09b0e361e383904d6edcdc2531405067..9dc0b9f01b24214323b87899e79e6202fbd57b08 100644 (file)
@@ -257,6 +257,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. */