[issue27211] Heap corruption via Python 2.7.11 IOBase readline()

2016-06-03 Thread Serhiy Storchaka
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

[issue27211] Heap corruption via Python 2.7.11 IOBase readline()

2016-06-03 Thread Roundup Robot
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

[issue27211] Heap corruption via Python 2.7.11 IOBase readline()

2016-06-03 Thread Benjamin Peterson
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