Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:yukoff:openSUSE:Leap:42.1:Backports
pacemaker.4956
pacemaker-libcrmcommon-compressed-message-heade...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-libcrmcommon-compressed-message-header.patch of Package pacemaker.4956
commit b96601712eb4a9f4310bb83db226aac067cc3c83 Author: Michal Koutný <mkoutny@suse.com> Date: Thu Jan 7 12:42:51 2016 +0100 Fix: header == NULL when parsing compressed message When parsing a compressed message, message header is reloaded from the uncompressed buffer. However, because remote->buffer_offset is zeroed prior that, it'll consider the buffer already processed and return NULL. Zeoring remote->buffer_offset after header retrieval should remedy this. AFAICS, the decompression branch is not used so this perhaps is not an issue in the real world. diff --git a/lib/common/remote.c b/lib/common/remote.c index 24c94c3..2aea6ab 100644 --- a/lib/common/remote.c +++ b/lib/common/remote.c @@ -383,9 +383,6 @@ crm_remote_parse_buffer(crm_remote_t * remote) return NULL; } - /* take ownership of the buffer */ - remote->buffer_offset = 0; - /* Support compression on the receiving end now, in case we ever want to add it later */ if (header->payload_compressed) { int rc = 0; @@ -421,6 +418,9 @@ crm_remote_parse_buffer(crm_remote_t * remote) header = crm_remote_header(remote); } + /* take ownership of the buffer */ + remote->buffer_offset = 0; + CRM_LOG_ASSERT(remote->buffer[sizeof(struct crm_remote_header_v0) + header->payload_uncompressed - 1] == 0); xml = string2xml(remote->buffer + header->payload_offset);
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