cpython
cpython copied to clipboard
[3.13] 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. (cherry picked from commit 522563549a49d28e763635c58274a23a6055f041)
- Issue: gh-143003