8000 [3.12] Fix undefined behaviour in datetime.time.fromisoformat() (GH-111982) by miss-islington · Pull Request #111992 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.12] Fix undefined behaviour in datetime.time.fromisoformat() (GH-111982) #111992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 12, 2023

Conversation

miss-islington
Copy link
Contributor

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 21615f7)

Co-authored-by: T. Wouters thomas@python.org

…1982)

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 21615f7)

Co-authored-by: T. Wouters <thomas@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

< 3481 div id="partial-users-participants" class="discussion-sidebar-item">
2 participants
0