From: Guenther Deschner Date: Thu, 7 May 2009 19:53:00 +0000 (-0700) Subject: s3-credentials: protect netlogon_creds_server_step() against NULL creds. X-Git-Tag: samba-3.2.12~34 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=7ee9206d8d8f1c1049534d538259044f7cc83e29 s3-credentials: protect netlogon_creds_server_step() against NULL creds. Found by SCHANNEL torture tests. Guenther (cherry picked from commit c578c66569eed3ae19b42c9787399eb70b935e0a) --- 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. */