Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
pacemaker.9287
bug-900296_pacemaker-xml-patch-no-versions.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bug-900296_pacemaker-xml-patch-no-versions.patch of Package pacemaker.9287
commit ada76264fe2cb243bfb90ea30c869268e144b194 Author: Gao,Yan <ygao@suse.com> Date: Wed Oct 8 20:26:48 2014 +0200 Fix: xml: Prevent assert errors in crm_element_value() on applying a patch without version information If the patch is generated with "crm_diff --no-version/-u". diff --git a/lib/common/xml.c b/lib/common/xml.c index 06de44c..51d6ada 100644 --- a/lib/common/xml.c +++ b/lib/common/xml.c @@ -1950,9 +1950,11 @@ bool xml_patch_versions(xmlNode *patchset, int add[3], int del[3]) return -EINVAL; } - for(lpc = 0; lpc < DIMOF(vfields); lpc++) { - crm_element_value_int(tmp, vfields[lpc], &(del[lpc])); - crm_trace("Got %d for del[%s]", del[lpc], vfields[lpc]); + if (tmp) { + for(lpc = 0; lpc < DIMOF(vfields); lpc++) { + crm_element_value_int(tmp, vfields[lpc], &(del[lpc])); + crm_trace("Got %d for del[%s]", del[lpc], vfields[lpc]); + } } switch(format) { @@ -1973,9 +1975,11 @@ bool xml_patch_versions(xmlNode *patchset, int add[3], int del[3]) return -EINVAL; } - for(lpc = 0; lpc < DIMOF(vfields); lpc++) { - crm_element_value_int(tmp, vfields[lpc], &(add[lpc])); - crm_trace("Got %d for add[%s]", add[lpc], vfields[lpc]); + if (tmp) { + for(lpc = 0; lpc < DIMOF(vfields); lpc++) { + crm_element_value_int(tmp, vfields[lpc], &(add[lpc])); + crm_trace("Got %d for add[%s]", add[lpc], vfields[lpc]); + } } return pcmk_ok;
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