HomeClusterLabs Projects

Refactor: libcrmcommon: Bounds-check crm_get_msec()

Description

Refactor: libcrmcommon: Bounds-check crm_get_msec()

Everywhere except watchdog.c. That requires enough changes to get its
own commit.

There may be cases that aren't technically correct, but with timeout
values higher than INT_MAX, there's no practical relevance. A timeout of
INT_MAX milliseconds is over three weeks if I did the math correctly.

The most important thing is to avoid overflow to negative values in
configurations with unreasonably large timeouts.

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

Details

Provenance
nrwahl2Authored on Jan 10 2024, 5:42 AM
Parents
rPad0d40c99a16: Merge pull request #3311 from nrwahl2/nrwahl2-T620_current
Branches
Unknown
Tags
Unknown