]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] 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:10 +0000 (12:41 +0100)
committerGitHub <noreply@github.com>
Thu, 25 Dec 2025 11:41:10 +0000 (13:41 +0200)
commit240ee207708e4103e4a9f459ff9bf285511e43cc
treeeaab81ff8e4b9642a027e10ef7c43bffd3543125
parentbac24eed2a9c91b415954d1b0b2f88bc60b45964
[3.14] gh-143004: Fix possible use-after-free in collections.Counter.update() (GH-143044) (GH-143166)

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