If this code had ever run, sys_acl_clear_perms() would have attempted to
write to some random address in memory. ‘mask_permset’ must be a valid
non‐NULL pointer.
Commit
9b79d5f2a2f8af75ef13bdc41d2dc296e19ba098 seems to have been a
previous attempt to fix this issue.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
if (!got_mask) {
SMB_ACL_ENTRY_T mask_entry;
- SMB_ACL_PERMSET_T mask_permset;
+ uint32_t mask_perm = 0;
+ SMB_ACL_PERMSET_T mask_permset = &mask_perm;
ret = sys_acl_create_entry(&the_acl, &mask_entry);
if (ret == -1) {
return -1;