From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Pokorný Date: Thu, 11 Oct 2012 16:21:07 +0200 Subject: [Cluster-devel] [PATCH 3/3] libcman: fix possible string nontermination: barrier name In-Reply-To: <1349965267-2261-1-git-send-email-jpokorny@redhat.com> References: <1349965267-2261-1-git-send-email-jpokorny@redhat.com> Message-ID: <1349965267-2261-4-git-send-email-jpokorny@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Similar to node name case (separate changeset). Signed-off-by: Jan Pokorn? --- cman/lib/libcman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cman/lib/libcman.c b/cman/lib/libcman.c index f27e726..d9d6c36 100644 --- a/cman/lib/libcman.c +++ b/cman/lib/libcman.c @@ -1131,6 +1131,6 @@ int cman_node_fenced(cman_handle_t handle, int nodeid, uint64_t time, char *agen f.nodeid = nodeid; f.fence_time = time; - strncpy(f.fence_agent, agent, sizeof(f.fence_agent) - 1); + strncpy(f.fence_agent, agent, sizeof(f.fence_agent)); return info_call(h, CMAN_CMD_UPDATE_FENCE_INFO, &f, sizeof(f), NULL, 0); } -- 1.7.11.4