From 3d9d9849441ed3c73d41d79fdfa973850cc53303 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 26 Mar 2020 11:04:31 +0100 Subject: [PATCH] libcli: Use ARRAY_DEL_ELEMENT() in security_descriptor_acl_del() Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- libcli/security/security_descriptor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libcli/security/security_descriptor.c b/libcli/security/security_descriptor.c index 7761eca3506..28c68215b8a 100644 --- a/libcli/security/security_descriptor.c +++ b/libcli/security/security_descriptor.c @@ -366,8 +366,7 @@ static NTSTATUS security_descriptor_acl_del(struct security_descriptor *sd, /* there can be multiple ace's for one trustee */ for (i=0;inum_aces;i++) { if (dom_sid_equal(trustee, &acl->aces[i].trustee)) { - memmove(&acl->aces[i], &acl->aces[i+1], - sizeof(acl->aces[i]) * (acl->num_aces - (i+1))); + ARRAY_DEL_ELEMENT(acl->aces, i, acl->num_aces); acl->num_aces--; if (acl->num_aces == 0) { acl->aces = NULL;