HomeClusterLabs Projects

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

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent 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 Apr 11 2025, 11:39 AM
Parents
rP74e56f6e8002: Refactor: libcrmcommon: EAGAIN isn't an error for pcmk__ipc_send_iov...
Branches
Unknown
Tags
Unknown

Event Timeline