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

[Cluster-devel] cluster/cman/daemon commands.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	pcaulfield sourceware org	2007-01-08 10:16:37

Modified files:
	cman/daemon    : commands.c 

Log message:
	Don't lose NUL on the end of the fence-agent.
	thanks to Simone Gotti <simone gotti email it> for the patch

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/daemon/commands.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.55.2.1&r2=1.55.2.2

--- cluster/cman/daemon/commands.c	2006/12/13 13:39:43	1.55.2.1
+++ cluster/cman/daemon/commands.c	2007/01/08 10:16:37	1.55.2.2
@@ -1088,7 +1088,7 @@
 {
 	struct cl_fence_info *f = (struct cl_fence_info *)cmdbuf;
 	struct cluster_node *node;
-	char msg[sizeof(struct cl_fencemsg)+strlen(f->fence_agent)];
+	char msg[sizeof(struct cl_fencemsg)+strlen(f->fence_agent)+1];
 	struct cl_fencemsg *fence_msg = (struct cl_fencemsg *)msg;
 
 	node = find_node_by_nodeid(f->nodeid);
@@ -1749,7 +1749,7 @@
 	if (node->fence_time && !msg->fence_time &&
 	    node->fence_agent && !msg->fence_agent[0])
 	{
-		char msg[sizeof(struct cl_fencemsg)+strlen(node->fence_agent)];
+		char msg[sizeof(struct cl_fencemsg)+strlen(node->fence_agent)+1];
 		struct cl_fencemsg *fence_msg = (struct cl_fencemsg *)msg;
 
 		fence_msg->cmd = CLUSTER_MSG_FENCESTATUS;


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