ldap/servers/slapd/dl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit def55f11ed6fa4d0698bc05b21aa0e8ac6904532
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Tue Sep 22 17:51:35 2015 +0200
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
diff --git a/ldap/servers/slapd/dl.c b/ldap/servers/slapd/dl.c
index 6dc1a44..5fcb076 100644
--- a/ldap/servers/slapd/dl.c
+++ b/ldap/servers/slapd/dl.c
@@ -248,7 +248,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 --;