s3-credentials: protect netlogon_creds_server_step() against NULL creds.
[ira/wip.git] / 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. */