1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

s4-drs: Don't skip over elements in uref_del_dest()

If we remove an element, we should not skip over the element following.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Joseph Sutton 2023-03-21 13:47:16 +13:00 committed by Andreas Schneider
parent b5b611d90f
commit f273dcf6c5

View File

@ -144,6 +144,11 @@ static WERROR uref_del_dest(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
if (i+1 < reps.count) {
memmove(&reps.r[i], &reps.r[i+1], sizeof(reps.r[i])*(reps.count-(i+1)));
}
/*
* If we remove an element, decrement i so that we don't
* skip over the element following.
*/
i--;
reps.count--;
found = true;
}