]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-143004: Fix possible use-after-free in collections.Counter.update() (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 25 Dec 2025 11:41:24 +0000 (12:41 +0100)
committerGitHub <noreply@github.com>
Thu, 25 Dec 2025 11:41:24 +0000 (13:41 +0200)
commit4dd9d94619be5c2795ec849f1edb810c0c048f79
treedadd83fb30efa2705c27126649470065f95f40da
parente132893cc710bbf1646ef8b33621ce9030e2d0ad
[3.13] gh-143004: Fix possible use-after-free in collections.Counter.update() (GH-143044) (GH-143167)

This happened when the Counter was mutated when incrementing
the value for an existing key.
(cherry picked from commit 86d904588e8c84c7fccb8faf84b343f03461970d)

Co-authored-by: kaushal trivedi <155625932+Kaushalt2004@users.noreply.github.com>
Lib/test/test_collections.py
Misc/NEWS.d/next/Library/2025-12-22-00-00-00.gh-issue-143004.uaf-counter.rst [new file with mode: 0644]
Modules/_collectionsmodule.c