[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH] libcman.c - don't try to copy out if (char *)agent==NULL



Index: libcman.c
===================================================================
RCS file: /cvs/cluster/cluster/cman/lib/libcman.c,v
retrieving revision 1.24
diff -u -r1.24 libcman.c
--- libcman.c	10 May 2006 14:20:07 -0000	1.24
+++ libcman.c	10 Jul 2006 17:52:15 -0000
@@ -943,7 +943,8 @@
 	ret = info_call(h, CMAN_CMD_GET_FENCE_INFO, &nodeid, sizeof(int), &f, sizeof(f));
 	if (!ret) {
 		*time = f.fence_time;
-		strcpy(agent, f.fence_agent);
+		if (agent)
+			strcpy(agent, f.fence_agent);
 		*fenced = ((f.flags & FENCE_FLAGS_FENCED) != 0);
 	}
 	return ret;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]