]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix undefined behaviour in datetime.time.fromisoformat() (#111982)
authorT. Wouters <thomas@python.org>
Sat, 11 Nov 2023 23:56:27 +0000 (00:56 +0100)
committerGitHub <noreply@github.com>
Sat, 11 Nov 2023 23:56:27 +0000 (00:56 +0100)
commit21615f77b5a580e83589abae618dbe7c298700e2
treebff2f57f9477d5113b69373b9c8d1301434fb1ea
parent38035fed9ba543d587c1fbba5c463d34edf3aff9
Fix undefined behaviour in datetime.time.fromisoformat() (#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).
Modules/_datetimemodule.c