Blame SOURCES/0079-Ticket-48283-many-attrlist_replace-errors-in-connect.patch

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