]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-143003: Fix possible shared buffer overflow in bytearray.extend() (GH-143086)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 28 Dec 2025 12:30:36 +0000 (14:30 +0200)
committerGitHub <noreply@github.com>
Sun, 28 Dec 2025 12:30:36 +0000 (12:30 +0000)
commit522563549a49d28e763635c58274a23a6055f041
tree853d08eaea880a83aafc35d42d9e9f9e21c15531
parent23abbf1f2b9123c9c486485ea37da6d36b464f88
gh-143003: Fix possible shared buffer overflow in bytearray.extend() (GH-143086)

When __length_hint__() returns 0 for non-empty iterator, the data can be
written past the shared 0-terminated buffer, corrupting it.
Lib/test/test_bytes.py
Misc/NEWS.d/next/Core_and_Builtins/2025-12-23-00-13-02.gh-issue-143003.92g5qW.rst [new file with mode: 0644]
Objects/bytearrayobject.c