]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42924: Fix incorrect copy in bytearray_repeat (GH-24208) (#24211)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 26 Apr 2021 19:39:51 +0000 (12:39 -0700)
committerGitHub <noreply@github.com>
Mon, 26 Apr 2021 19:39:51 +0000 (21:39 +0200)
commitd0698c676ca1b7d34be4165a631bf4847583de76
treecbbf1f3808028add2c1ec80ca128f2cb319a2406
parentc9c1dbd253d70665c1fd20e6341f9a08e21f37f4
bpo-42924: Fix incorrect copy in bytearray_repeat (GH-24208) (#24211)

Before, using the * operator to repeat a bytearray would copy data from the start of
the internal buffer (ob_bytes) and not from the start of the actual data (ob_start).
(cherry picked from commit 61d8c54f43a7871d016f98b38f86858817d927d5)

Co-authored-by: Tobias Holl <TobiasHoll@users.noreply.github.com>
Lib/test/test_bytes.py
Misc/NEWS.d/next/Core and Builtins/2021-01-13-14-06-01.bpo-42924._WS1Ok.rst [new file with mode: 0644]
Objects/bytearrayobject.c