Browse Source

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
Ludwig Krispenz 10 years ago
parent
commit
2853143479
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ldap/servers/slapd/dl.c

+ 1 - 1
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 --;