Serhiy Storchaka added the comment:
This bug was fixed for 3.x in issue18408. Maybe we should backport other
Victor's fixes from this issue.
Yet one possible bug -- using memcpy instead of memmove. The memory block can
be resized without changing the address.
--
nosy: +haypo, serhiy.s
Roundup Robot added the comment:
New changeset afbd4473947a by Benjamin Peterson in branch '2.7':
check the result of PyByteArray_Resize in readline() (closes #27211)
https://hg.python.org/cpython/rev/afbd4473947a
--
nosy: +python-dev
resolution: -> fixed
stage: -> resolved
status: ope
New submission from Benjamin Peterson:
Guido Vranken on PSRT report:
Python-2.7.11/Modules/_io/iobase.c iobase_readline():
531 old_size = PyByteArray_GET_SIZE(buffer);
532 PyByteArray_Resize(buffer, old_size + PyBytes_GET_SIZE(b));
533 memcpy(PyByteArray_AS_STRING(buffer