HomeClusterLabs Projects

Fix: libcrmcommon: Prevent buffer overflow in pcmk__element_xpath()

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Fix: libcrmcommon: Prevent buffer overflow in pcmk__element_xpath()

Use GString instead of snprintf() with a buffer and offset, so that we
can easily and dynamically grow to meet our string size needs.

When a string is only used or tracing, do not build the string unless
tracing is enabled. We want to avoid the overhead. See the
pcmk__log_else() calls.

Ref T152
Resolves RHBZ#1822125

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Sep 8 2022, 4:12 AM
root <root@boomstick.rhts.eng.bos.redhat.com>Committed on Sep 19 2022, 3:53 PM
Tasks
Restricted Maniphest Task

Commit No Longer Exists

This commit no longer exists in the repository.