From c578c66569eed3ae19b42c9787399eb70b935e0a Mon Sep 17 00:00:00 2001 From: Guenther Deschner Date: Thu, 7 May 2009 12:53:00 -0700 Subject: [PATCH] s3-credentials: protect netlogon_creds_server_step() against NULL creds. Found by SCHANNEL torture tests. Guenther --- source/libsmb/credentials.c | 4 ++++ 1 file changed, 4 insertions(+) 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. */ -- 2.11.4.GIT