Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
📜🤖 Added by blurb_it.
  • Loading branch information
blurb-it[bot] authored Mar 3, 2026
commit 5673c7eb2096ed23a470e0f6882c63b946b7e8c6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix refleak and null pointer deref in unusual error path of :mod:`datetime`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove it, users should not be impacted by this change. The error case is very unlikely.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggested adding it since this PR covers several cases increasing the likelyhood of one of them being hit. If you think it is better to remove it, I don't mind.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, we don't document such fix for an unlikely corner case.

PyLong_FromLong() can only fail if the system has no more free memory.

datetime.datetime.astimezone() reads freed memory, but it only occurs if utcoffset() returns the wrong type. It seems like nobody reported the issue (with a reproducer), so it sounds unlikely to crash in practice (reading freed memory just works in the common case).

Loading