From nobody Wed Feb 21 20:59:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tg7tc1wyWz5BM6T; Wed, 21 Feb 2024 20:59:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tg7tc0lX7z4HWL; Wed, 21 Feb 2024 20:59:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708549160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=louh48h4odhmqZBou2vPIdpyotU3qPuzhVDPhTA2emE=; b=A/n0txwJIE365abmjtfHcDAhlAxmgK8f9yvrgyYgIoAGGQ1B6njfuktRdhrx7h4UXDccff 3khZkE0vBMzymg/pueiQ+mcI47USmAd1zDY3AxKq8TLBUZ9WWvZxacWX4sqUVO06FnavSx BVoQQyHhL6bfS+ADshZnmhN4QIrBfRBYyWjP0nn6heBk+rBMjUjOxkJULblZKmSA5Jw6p1 U2bfVHZkacXd8QQNNymhYPQMi6HgccBLiNcVOpmR9CSbYtBVObdPMCdlEe/XDjlIbhgGui Q26m1WZrB/5UUp63LdrAllKFyaFhloIuyUHPRdOJfVp/1NRhTnugeb8pyl0Fjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708549160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=louh48h4odhmqZBou2vPIdpyotU3qPuzhVDPhTA2emE=; b=Wl/Gxsnf3NysDvfXvw+K+07pAcqBWka0OLhT/IwDGAnLMGSYQsIMCSe9/q1v/HLTiMcEz1 S2NKCS4yfjlPCxFXT3Xd2OmbDRdEfy8RpyRelmFYz2RmIMs7Fjt7KZ7zFkHcEpEMAzaViv jM6e7ytXGKXXPrDfRgr/GiZVwQsNYvUjQ1UFKrGt8qJTfnaWWOc+u8Ruk6JT2ZSX2fskJp 6lZuLCf1rDQUT+t5/5Lxucr5CNXYY5Gm9pSYijxrJhsenh/OvWLLEjMZjzM75Q7KaM3S5R Wa0afpdt5kQazke2KJxPluJTFq8TY8aI1BTkS4/JHKeoHMze4kV7RypSqwlqAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708549160; a=rsa-sha256; cv=none; b=hA0HxvWcmWIblQp3J0ZiJ9BaAJVIDlHhnlwNwLqH6SPAhJhe1m8HbTNVWcWd9wAa69no1d yzOslIt/43QKB+XsjTvQ6xg65/LXyX565Uit4Ag33YnE2jDnIQoNfhceXS/DYUsW3XksEb 5TizghJSkw9IJmh995Hkklkx1B19Yy2H+O9v0/jX0UKBtqv8WPLurOYzYAEHSyLLq2FpRL 5T5z4nxbI2B+khWewdR3rarNtQaxgN7A6xIgWBPyKJoVEf3noY0lB2alFBuGuft/s5Fu9C UYYT/bWVFySI/QtU35YDouiAZAFyFW0ge/S7lV+UtK3mDHzYPjpEymafQ109rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tg7tb6yWqz1JFx; Wed, 21 Feb 2024 20:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41LKxJqB037001; Wed, 21 Feb 2024 20:59:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41LKxJ0e036998; Wed, 21 Feb 2024 20:59:19 GMT (envelope-from git) Date: Wed, 21 Feb 2024 20:59:19 GMT Message-Id: <202402212059.41LKxJ0e036998@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 245844372d7e - stable/14 - tzcode: Fix overflow handling in TZ parser. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 245844372d7e4dd7c633816b67c0da59be75b812 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=245844372d7e4dd7c633816b67c0da59be75b812 commit 245844372d7e4dd7c633816b67c0da59be75b812 Author: Dag-Erling Smørgrav AuthorDate: 2024-02-18 09:48:08 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-02-21 20:33:23 +0000 tzcode: Fix overflow handling in TZ parser. Obtained from: upstream 9fc11a27 MFC after: 1 week PR: 276281 (cherry picked from commit 1365bb722af1365baee6ea1e3d44917533908d53) --- contrib/tzcode/localtime.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c index 2b33cce1ec50..25a65385256b 100644 --- a/contrib/tzcode/localtime.c +++ b/contrib/tzcode/localtime.c @@ -1246,11 +1246,13 @@ tzparse(const char *name, struct state *sp, struct state const *basep) do { int_fast32_t yearsecs = year_lengths[isleap(yearbeg - 1)] * SECSPERDAY; + time_t janfirst1 = janfirst; yearbeg--; - if (increment_overflow_time(&janfirst, -yearsecs)) { + if (increment_overflow_time(&janfirst1, -yearsecs)) { janoffset = -yearsecs; break; } + janfirst = janfirst1; } while (atlo < janfirst && EPOCH_YEAR - YEARSPERREPEAT / 2 < yearbeg);