HomeClusterLabs Projects

Low: libcrmcommon: use uint32_t in parse_date()

Description

Low: libcrmcommon: use uint32_t in parse_date()

The time APIs use int and uint32_t interchangeably for variables, struct
members, function arguments, and return values, opening up numerous
possibilities for range errors.

Use uint32_t instead of int for year, month, day, and week in
parse_date(), since those should always be positive and are passed to
get_ordinal_days(), which takes uint32_t.

Details

Provenance
kgaillotAuthored on Aug 27 2024, 12:02 PM
Parents
rP231d89a11828: Refactor: libcrmcommon: validate year in crm_time_days_in_month()
Branches
Unknown
Tags
Unknown