
In at least one instance around line 1187 of localtime.c, the code assumes that increment_overflow_time() does not modify the result if the operation overflowed, but that is not true when using C23 checked arithmetic. Details: https://bugs.freebsd.org/276281, particularly comment 11. One possible solution is attached. I'm not overly fond of it because it penalizes the common case, but it was easier than trying to understand and reformulate the loop in tzparse(). DES -- Dag-Erling Smørgrav - des@des.no

On 2024-02-16 05:23, Dag-Erling Smørgrav via tz wrote:
One possible solution is attached. I'm not overly fond of it because it penalizes the common case, but it was easier than trying to understand and reformulate the loop in tzparse().
Thanks for the bug report. I installed the attached, which attacks the problem in a different way, similar to the way it's already attacked a few lines later.
participants (2)
-
Dag-Erling Smørgrav
-
Paul Eggert