]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] Fix undefined behaviour in datetime.time.fromisoformat() (GH-111982) (#111992)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 12 Nov 2023 00:39:03 +0000 (01:39 +0100)
committerGitHub <noreply@github.com>
Sun, 12 Nov 2023 00:39:03 +0000 (00:39 +0000)
commit1afc4dc3e6b95d4a23cdcbe2ebebe1d0ba09f0f4
treeff4d1539d04da2d62a23e2e49d05caf7be794309
parent0f7671cc6963db087cb99354b03999bde5b1d2dd
[3.12] Fix undefined behaviour in datetime.time.fromisoformat() (GH-111982) (#111992)

Fix undefined behaviour in datetime.time.fromisoformat() (GH-111982)

Fix undefined behaviour in datetime.time.fromisoformat() when parsing a string without a timezone. 'tzoffset' is not assigned to by parse_isoformat_time if it returns 0, but time_fromisoformat then passes tzoffset to another function, which is undefined behaviour (even if the function in question does not use the value).
(cherry picked from commit 21615f77b5a580e83589abae618dbe7c298700e2)

Co-authored-by: T. Wouters <thomas@python.org>
Modules/_datetimemodule.c