Skip to content

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

Merged
Yhg1s merged 1 commit into
python:3.11from
miss-islington:backport-21615f7-3.11
Nov 12, 2023
Merged

[3.11] Fix undefined behaviour in datetime.time.fromisoformat() (GH-111982)#111991
Yhg1s merged 1 commit into
python:3.11from
miss-islington:backport-21615f7-3.11

Conversation

@miss-islington

Copy link
Copy Markdown
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.

2 participants