]> git.ipfire.org Git - thirdparty/chrony.git/commit
leapdb: fix leapsec list processing with 32-bit time_t
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 3 Apr 2024 09:01:44 +0000 (11:01 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 3 Apr 2024 09:01:44 +0000 (11:01 +0200)
commitb8ead3485b7261aabe3357b99543aa492d1422e9
tree5008396248c802843ee86c79ab87d8fbc9624cd0
parent24d28cd679ab3962e8b29d620708ca8bc416d4c2
leapdb: fix leapsec list processing with 32-bit time_t

A 32-bit time_t value overflows when converted to the Y1900 epoch used
in the leapsec list. Use a 64-bit variable in get_list_leap() to fix the
comparisons on systems using 32-bit time_t.

Fixes: 53823b9f1c07 ("leapdb: support leap-seconds.list as second source")
leapdb.c