shared/calendarspec: abort calculation after 1000 iterations
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 21 Mar 2021 19:59:32 +0000 (20:59 +0100)
committerLuca Boccassi <bluca@debian.org>
Mon, 27 May 2024 13:02:03 +0000 (14:02 +0100)
commit72ff8b41c884fa1fed31bb51c2878abb28d6c3dc
tree6271f3de63cde359ac61da95d57685a5ea7d6d36
parent593866d1baab5724ff42f51a0fba9a27f65d1e40
shared/calendarspec: abort calculation after 1000 iterations

We have a bug where we seem to enter an infinite loop when running in the
Europe/Dublin timezone. The timezone is "special" because it has negative SAVE
values. The handling of this should obviously be fixed, but let's use a
belt-and-suspenders approach, and gracefully fail if we fail to find an answer
within a specific number of attempts. The code in this function is rather
complex, and it's hard to rule out another bug in the future.

(cherry picked from commit 169615c9a8cdc54d748d4dfc8279be9b3c2bec44)

Gbp-Pq: Name shared-calendarspec-abort-calculation-after-1000-iteratio.patch
src/shared/calendarspec.c