Skip to content

Commit 7e73c5d

Browse files
committed
📜🤖 Added by blurb_it.
gh-144475: Add NEWS entry for functools.partial.__repr__ fix
1 parent a445c16 commit 7e73c5d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Fix a heap-buffer-overflow in :func:`functools.partial.__repr__` where a
2+
user-defined :meth:`~object.__repr__` on an argument could mutate the
3+
:class:`~functools.partial` object via :meth:`~functools.partial.__setstate__`,
4+
freeing the args tuple while iteration was still in progress. The fix holds
5+
strong references to the ``args`` tuple, ``kw`` dict, and ``fn`` callable
6+
during formatting.

0 commit comments

Comments
 (0)