]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/security: sddl: check a talloc_zero
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 20 Oct 2023 23:56:54 +0000 (12:56 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 1 Nov 2023 20:10:45 +0000 (20:10 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/sddl.c

index e973a0910053ac016c66e871aa3145236040fe7b..04cc577d2c8da6861339bb9d975bf85a28bc0756 100644 (file)
@@ -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;