Commit e5153d0
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().
* input_chunk could be decrefed twice in TextIOWrapper.seek()
after failed Py_BuildValue().
* initvalue could leak in StringIO.__getstate__() after failed
PyDict_Copy().
(cherry picked from commit fdb5a50)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent db7ac30 commit e5153d0
2 files changed
Lines changed: 17 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
870 | 870 | | |
871 | 871 | | |
872 | 872 | | |
873 | | - | |
| 873 | + | |
| 874 | + | |
874 | 875 | | |
| 876 | + | |
875 | 877 | | |
876 | 878 | | |
877 | 879 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1540 | 1540 | | |
1541 | 1541 | | |
1542 | 1542 | | |
| 1543 | + | |
1543 | 1544 | | |
1544 | | - | |
1545 | 1545 | | |
1546 | 1546 | | |
1547 | | - | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
1548 | 1553 | | |
1549 | 1554 | | |
1550 | 1555 | | |
| |||
2093 | 2098 | | |
2094 | 2099 | | |
2095 | 2100 | | |
| 2101 | + | |
2096 | 2102 | | |
2097 | 2103 | | |
2098 | 2104 | | |
| |||
2227 | 2233 | | |
2228 | 2234 | | |
2229 | 2235 | | |
2230 | | - | |
2231 | | - | |
2232 | | - | |
| 2236 | + | |
| 2237 | + | |
2233 | 2238 | | |
2234 | 2239 | | |
| 2240 | + | |
2235 | 2241 | | |
2236 | 2242 | | |
2237 | 2243 | | |
| |||
2249 | 2255 | | |
2250 | 2256 | | |
2251 | 2257 | | |
2252 | | - | |
2253 | | - | |
| 2258 | + | |
| 2259 | + | |
2254 | 2260 | | |
| 2261 | + | |
2255 | 2262 | | |
2256 | 2263 | | |
2257 | 2264 | | |
| |||
0 commit comments