don't crash on null acl sort
authorAndrew Tridgell <tridge@samba.org>
Thu, 22 Feb 2001 06:35:54 +0000 (06:35 +0000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 22 Feb 2001 06:35:54 +0000 (06:35 +0000)
(This used to be commit 59341377413fcbf30c090a3763608d23ac2bff95)

source3/utils/smbcacls.c

index bef16d349c701a909de800cc22d40da45980b1df..5ea595c4ea135831a4a0c51f18d66e42a8d6c91d 100644 (file)
@@ -544,6 +544,8 @@ static void sort_acl(SEC_ACL *the_acl)
        int i, ace_ndx = 0;
        BOOL do_denied = True;
 
+       if (!the_acl) return;
+
        tmp_ace = (SEC_ACE *)malloc(sizeof(SEC_ACE) * the_acl->num_aces);
 
        if (!tmp_ace) return;