HomeClusterLabs Projects

Low: libcrmcommon: Don't assert on checking for a NULL terminator.
bb9622770a9eUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Low: libcrmcommon: Don't assert on checking for a NULL terminator.

header->size doesn't mean the same thing anymore now that we have split
up IPC messages. If pcmk__client_data2xml is given an IPC message that
did not have to be split up, then the size member will be the same as
the size of the entire message. However, if it was given an IPC message
that had to be split up for transmit and then reassembled, the size
member only refers to the size of the last chunk received.

Thus, checking for a NULL character in the position given by size will
have us checking somewhere in the middle of the reassembled string which
is obviously wrong.

Details

Provenance
clumensAuthored on Fri, Apr 11, 11:39 AM
Parents
rP82e43a354d14: Refactor: libcrmcommon: Add a GByteArray buffer to pcmk__client_s.
Branches
Unknown
Tags
Unknown

Event Timeline