From: Joseph Sutton Date: Fri, 11 Aug 2023 00:15:05 +0000 (+1200) Subject: s4:kdc: Ensure that we don’t dereference a NULL pointer X-Git-Tag: tevent-0.16.0~972 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6b78ef7f7ef2d9fc16aee3f7edfc31163fdf284;p=thirdparty%2Fsamba.git s4:kdc: Ensure that we don’t dereference a NULL pointer Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/kdc/ad_claims.c b/source4/kdc/ad_claims.c index 15b2efdf26f..714f5484af5 100644 --- a/source4/kdc/ad_claims.c +++ b/source4/kdc/ad_claims.c @@ -689,6 +689,10 @@ static NTSTATUS encode_claims_set(TALLOC_CTX *mem_ctx, struct CLAIMS_SET_METADATA *metadata = NULL; struct CLAIMS_SET_METADATA_NDR *metadata_ndr = NULL; + if (claims_blob == NULL) { + return NT_STATUS_INVALID_PARAMETER_3; + } + tmp_ctx = talloc_new(mem_ctx); if (tmp_ctx == NULL) { return NT_STATUS_NO_MEMORY;