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>
Sun, 18 Jun 2023 14:55:54 +0000 (15:55 +0100)
commita6f055734cd82636c4feaf016091e4c215e3fcee
tree8ae6ec20a94446208a53ac5f791e245d5a3c1d9a
parentd86b24cab16f6d672ed03a2e0eaf038610abb4e5
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