From 818f6a27ff92bf7adb5f378f985e9c8f36193812 Mon Sep 17 00:00:00 2001 From: Ludwig Krispenz Date: Tue, 22 Sep 2015 17:51:35 +0200 Subject: [PATCH] Ticket 48283 - many attrlist_replace errors in connection with cleanallruv Bug Description: attrlist_replace error messages are logged because the list of values contains duplicate attributes Fix Description: the duplicate values can appear because when a replica is removed from the ruv the array is compacted, but memcpy is used instead of memmove https://fedorahosted.org/389/ticket/48283 Reviewed by: Rich, Thanks (cherry picked from commit 2674f5594a2eb088be34728c12c1169df36b1588) --- ldap/servers/slapd/dl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldap/servers/slapd/dl.c b/ldap/servers/slapd/dl.c index 8233519..c6858f3 100644 --- a/ldap/servers/slapd/dl.c +++ b/ldap/servers/slapd/dl.c @@ -219,7 +219,7 @@ void *dl_delete (DataList *dl, const void *element, CMPFN cmpfn, FREEFN freefn) if (i != dl->element_count - 1) { - memcpy (&dl->elements[i], &dl->elements[i+1], (dl->element_count - i - 1) * sizeof (void*)); + memmove (&dl->elements[i], &dl->elements[i+1], (dl->element_count - i - 1) * sizeof (void*)); } dl->element_count --; -- 2.4.3