]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[2.7] bpo-25862: Fix several bugs in the _io module. (GH-8026) (GH-8033)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 4 Dec 2018 10:02:48 +0000 (12:02 +0200)
committerGitHub <noreply@github.com>
Tue, 4 Dec 2018 10:02:48 +0000 (12:02 +0200)
commiteab421bff954e4fb77516bfe6c98d30ced1412d0
tree81cb028d6f947bd1c345f2e4957fca153553b208
parent8687bd86e6f138ef0699a1e9f3f9555765949b51
[2.7] bpo-25862: Fix several bugs in the _io module. (GH-8026) (GH-8033)

They can be exposed when some C API calls fail due to lack of
memory.

* Failed Py_BuildValue() could cause an assertion error in the
  following TextIOWrapper.tell().
* initvalue could leak in StringIO.__getstate__() after failed
  PyDict_Copy().
(cherry picked from commit fdb5a50ef34f7951c3b01eb77b1359725a9ad670)
Modules/_io/stringio.c
Modules/_io/textio.c