From a113ca9523bba37f884f1cc77deb206ec8855a5f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 7 Jan 2015 17:12:54 +0100 Subject: [PATCH] s3-libads: Fix a possible segfault in kerberos_fetch_pac(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=11037 Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison (cherry picked from commit a13e29cc4345d85ab6fe4482119386b87e4e8673) --- source3/libads/authdata.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source3/libads/authdata.c b/source3/libads/authdata.c index 2c667a6..b4aee72 100644 --- a/source3/libads/authdata.c +++ b/source3/libads/authdata.c @@ -59,17 +59,17 @@ static NTSTATUS kerberos_fetch_pac(struct auth4_context *auth_ctx, return NT_STATUS_NO_MEMORY; } - if (pac_blob) { + if (pac_blob != NULL) { status = kerberos_pac_logon_info(tmp_ctx, *pac_blob, NULL, NULL, NULL, NULL, 0, &logon_info); if (!NT_STATUS_IS_OK(status)) { goto done; } - } - talloc_set_name_const(logon_info, "struct PAC_LOGON_INFO"); + talloc_set_name_const(logon_info, "struct PAC_LOGON_INFO"); - auth_ctx->private_data = talloc_steal(auth_ctx, logon_info); + auth_ctx->private_data = talloc_steal(auth_ctx, logon_info); + } *session_info = talloc_zero(mem_ctx, struct auth_session_info); if (!*session_info) { status = NT_STATUS_NO_MEMORY; -- 2.2.1