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 Tue, Aug 27, 12:02 PM
Parents
rP1a0aab0f99fc: Refactor: libcrmcommon: validate year in crm_time_days_in_month()
Branches
Unknown
Tags
Unknown