From 80e1a92ae770fbf97b22e6e99103def755294992 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Thu, 7 May 2009 13:32:41 +0200 Subject: [PATCH] s3-credentials: protect netlogon_creds_server_step() against NULL creds. Found by SCHANNEL torture tests. Guenther (cherry picked from commit 8e490d2fa1c52be5da331df0b314508f77ec1f6e) --- source3/libsmb/credentials.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/libsmb/credentials.c b/source3/libsmb/credentials.c index 9ba460f8696..41ab549b543 100644 --- a/source3/libsmb/credentials.c +++ b/source3/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