Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
pacemaker.13547
pacemaker-right-size-for-string-buffer-fake_tra...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-right-size-for-string-buffer-fake_transition.patch of Package pacemaker.13547
commit 00f214459e587476742eb8367fd47bfc8a5fdc74 Author: Ken Gaillot <kgaillot@redhat.com> Date: Fri Sep 22 16:37:32 2017 -0500 Low: tools: use right size for string buffer in fake_transition.c issue found by Jan Pokorný <jpokorny@redhat.com> diff --git a/tools/fake_transition.c b/tools/fake_transition.c index bb5c8977b..db0ad1edf 100644 --- a/tools/fake_transition.c +++ b/tools/fake_transition.c @@ -184,23 +184,20 @@ static xmlNode * inject_node_state(cib_t * cib_conn, const char *node, const char *uuid) { int rc = pcmk_ok; - int max = strlen(rsc_template) + strlen(node) + 1; - char *xpath = NULL; xmlNode *cib_object = NULL; - - xpath = calloc(1, max); + char *xpath = crm_strdup_printf(node_template, node); if (bringing_nodes_online) { create_node_entry(cib_conn, node); } - snprintf(xpath, max, node_template, node); rc = cib_conn->cmds->query(cib_conn, xpath, &cib_object, cib_xpath | cib_sync_call | cib_scope_local); if (cib_object && ID(cib_object) == NULL) { crm_err("Detected multiple node_state entries for xpath=%s, bailing", xpath); crm_log_xml_warn(cib_object, "Duplicates"); + free(xpath); crm_exit(ENOTUNIQ); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor