gh-143003: Fix possible shared buffer overflow in bytearray.extend()#143086
Conversation
…end() When __length_hint__() returns 0 for non-empty iterator, the data can be written past the shared 0-terminated buffer, corrupting it.
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
…ray.extend() (pythonGH-143086) When __length_hint__() returns 0 for non-empty iterator, the data can be written past the shared 0-terminated buffer, corrupting it. (cherry picked from commit 5225635) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
GH-143447 is a backport of this pull request to the 3.14 branch. |
…ray.extend() (pythonGH-143086) When __length_hint__() returns 0 for non-empty iterator, the data can be written past the shared 0-terminated buffer, corrupting it. (cherry picked from commit 5225635) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
GH-143448 is a backport of this pull request to the 3.13 branch. |
|
…end() (pythonGH-143086) When __length_hint__() returns 0 for non-empty iterator, the data can be written past the shared 0-terminated buffer, corrupting it.
When
__length_hint__()returns 0 for non-empty iterator, the data can be written past the shared 0-terminated buffer, corrupting it.bytearray_extendvia misleading__length_hint__#143003