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 no longer exists in the repository. It may have been part of a branch which was deleted.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 Apr 11 2025, 11:39 AM

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.