Explorar o código

Wrong value being used to determine leave list, resulting in
a memcpy with a -1 value in some cases, and the incorrect memcpy
in other cases.

(Logical change 1.20)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@49 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake %!s(int64=21) %!d(string=hai) anos
pai
achega
beb82b3bcb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      exec/clm.c

+ 1 - 1
exec/clm.c

@@ -286,7 +286,7 @@ static void libraryNotificationLeave (SaClmNodeIdT *nodes, int nodes_entries)
 			if (nodes[i] == clusterNodes[j].nodeId) {
 				clusterNodeEntries -= 1;
 				memcpy (&clusterNodes[j], &clusterNodes[j + 1],
-					(clusterNodeEntries - i) * sizeof (SaClmClusterNodeT));
+					(clusterNodeEntries - j) * sizeof (SaClmClusterNodeT));
 			} else {
 				/*
 				 * next clusterNode entry