gh-112625: Protect bytearray from being freed by misbehaving iterator… · python/cpython@0e732d0 · GitHub
Skip to content

Commit 0e732d0

Browse files
authored
gh-112625: Protect bytearray from being freed by misbehaving iterator inside bytearray.join (GH-112626)
1 parent 23e001f commit 0e732d0

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

Lib/test/test_builtin.py

Lines changed: 17 additions & 0 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixes a bug where a bytearray object could be cleared while iterating over an argument in the ``bytearray.join()`` method that could result in reading memory after it was freed.

Objects/bytearrayobject.c

Lines changed: 4 additions & 1 deletion

0 commit comments

Comments
 (0)