HomeClusterLabs Projects

Low: libcrmcommon: Check invalid time value in pacemakerd API reply

Description

Low: libcrmcommon: Check invalid time value in pacemakerd API reply

If the XML_ATTR_TSTAMP attribute is present but can't be parsed as an
integer, value_ll gets set to PCMK__PARSE_INT_DEFAULT (-1). This should
never happen, but just in case, we should convert a negative to 0 before
we cast to time_t, an unsigned type.

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

Details

Provenance
nrwahl2Authored on Oct 10 2022, 3:51 PM
Parents
rP775863558c6c: Feature: pacemakerd: New pcmk__pcmkd_state_enum2friendly() function
Branches
Unknown
Tags
Unknown