Fix bug #8811 - sd_has_inheritable_components segfaults on an SD that se_access_check...
authorJeremy Allison <jra@samba.org>
Wed, 14 Mar 2012 02:26:02 +0000 (19:26 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 14 Mar 2012 04:08:03 +0000 (05:08 +0100)
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Mar 14 05:08:03 CET 2012 on sn-devel-104

libcli/security/secdesc.c

index fcd0828963a016d1bf3c7db0acc24e96d5f56190..84128e4acde7e4826b57720deca91ee2bf42539c 100644 (file)
@@ -542,6 +542,10 @@ bool sd_has_inheritable_components(const struct security_descriptor *parent_ctr,
        unsigned int i;
        const struct security_acl *the_acl = parent_ctr->dacl;
 
+       if (the_acl == NULL) {
+               return false;
+       }
+
        for (i = 0; i < the_acl->num_aces; i++) {
                const struct security_ace *ace = &the_acl->aces[i];