summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenther Deschner <gd@samba.org>2009-05-07 12:53:00 -0700
committerKarolin Seeger <kseeger@samba.org>2009-06-02 12:41:55 +0200
commit7ee9206d8d8f1c1049534d538259044f7cc83e29 (patch)
treeaa6981387256822612e888cffa5bac04c8876106
parent8d454f5783a834a8cd05a07995f4654129f14ff2 (diff)
downloadsamba-7ee9206d8d8f1c1049534d538259044f7cc83e29.tar.gz
s3-credentials: protect netlogon_creds_server_step() against NULL creds.
Found by SCHANNEL torture tests. Guenther (cherry picked from commit c578c66569eed3ae19b42c9787399eb70b935e0a)
-rw-r--r--source/libsmb/credentials.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/libsmb/credentials.c b/source/libsmb/credentials.c
index 9d33e6d93d7..4bfa2318c44 100644
--- a/source/libsmb/credentials.c
+++ b/source/libsmb/credentials.c
@@ -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. */