From: Günther Deschner Date: Thu, 7 May 2009 11:32:41 +0000 (+0200) Subject: s3-credentials: protect netlogon_creds_server_step() against NULL creds. X-Git-Tag: tdb-1.1.5~703 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e490d2fa1c52be5da331df0b314508f77ec1f6e;p=thirdparty%2Fsamba.git s3-credentials: protect netlogon_creds_server_step() against NULL creds. Found by SCHANNEL torture tests. Guenther --- diff --git a/source3/libsmb/credentials.c b/source3/libsmb/credentials.c index 0d7bde0c09b..9dc0b9f01b2 100644 --- a/source3/libsmb/credentials.c +++ b/source3/libsmb/credentials.c @@ -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. */