From mboxrd@z Thu Jan 1 00:00:00 1970 From: pcaulfield@sourceware.org Date: 8 Jan 2007 10:16:37 -0000 Subject: [Cluster-devel] cluster/cman/daemon commands.c Message-ID: <20070108101637.17040.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: cluster Branch: RHEL5 Changes by: pcaulfield at 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 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;