From cc11165ecbcb1f51f853ffe8b1ab9ec338bfb4d0 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Sat, 21 Oct 2023 12:56:54 +1300 Subject: [PATCH] libcli/security: sddl: check a talloc_zero Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- libcli/security/sddl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libcli/security/sddl.c b/libcli/security/sddl.c index e973a091005..04cc577d2c8 100644 --- a/libcli/security/sddl.c +++ b/libcli/security/sddl.c @@ -827,7 +827,9 @@ struct security_descriptor *sddl_decode(TALLOC_CTX *mem_ctx, const char *sddl, }; struct security_descriptor *sd; sd = talloc_zero(mem_ctx, struct security_descriptor); - + if (sd == NULL) { + goto failed; + } sd->revision = SECURITY_DESCRIPTOR_REVISION_1; sd->type = SEC_DESC_SELF_RELATIVE;