andykimpe / rpms / 389-ds-base

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