HomeClusterLabs Projects

Low: libcrmcommon: Avoid out-of-bounds string access in log_data_element

Description

Low: libcrmcommon: Avoid out-of-bounds string access in log_data_element

If prefix is NULL, we set it to "", and then we strdup it and access the
element at index 1. There is no element at index 1.

Here we CRM_CHECK() that strlen(prefix) >= 2 in places where we require
it to be.

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

Details

Provenance
nrwahl2Authored on Dec 7 2022, 2:04 AM
Parents
rPd16166ef1ae9: Refactor: libcrmcommon: New pcmk__text_output_new()
Branches
Unknown
Tags
Unknown