This rejects outlandish zic input like "Zone X -596523:14:08 - XXT". * NEWS: Mention this. * zic.c (addtype): Do not allow a UT offset of -2**31. --- NEWS | 2 ++ zic.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f645aafa..b4f3ead8 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,8 @@ Unreleased, experimental changes zic no longer assumes you can fflush a read-only stream. (Problem reported by Christos Zoulas.) + zic no longer generates UT offsets equal to -2**31, as RFC 9636 + prohibits them. Release 2025c - 2025-12-10 14:42:37 -0800 diff --git a/zic.c b/zic.c index eecd8ac2..b69414dd 100644 --- a/zic.c +++ b/zic.c @@ -3760,7 +3760,8 @@ addtype(zic_t utoff, char const *abbr, bool isdst, bool ttisstd, bool ttisut) { register int i, j; - if (! (-1 - 2147483647 <= utoff && utoff <= 2147483647)) { + /* RFC 9636 section 3.2 specifies this range for utoff. */ + if (! (-2147483647 <= utoff && utoff <= 2147483647)) { error(_("UT offset out of range")); exit(EXIT_FAILURE); } -- 2.51.0