Commit dedb28e
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 <[email protected]>
1 parent fd1c092 commit dedb28e
2 files changed
+17
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
829 | | - | |
| 829 | + | |
| 830 | + | |
830 | 831 | | |
| 832 | + | |
831 | 833 | | |
832 | 834 | | |
833 | 835 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1773 | 1773 | | |
1774 | 1774 | | |
1775 | 1775 | | |
| 1776 | + | |
1776 | 1777 | | |
1777 | | - | |
1778 | 1778 | | |
1779 | 1779 | | |
1780 | | - | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
1781 | 1786 | | |
1782 | 1787 | | |
1783 | 1788 | | |
| |||
2326 | 2331 | | |
2327 | 2332 | | |
2328 | 2333 | | |
| 2334 | + | |
2329 | 2335 | | |
2330 | 2336 | | |
2331 | 2337 | | |
| |||
2460 | 2466 | | |
2461 | 2467 | | |
2462 | 2468 | | |
2463 | | - | |
2464 | | - | |
2465 | | - | |
| 2469 | + | |
| 2470 | + | |
2466 | 2471 | | |
2467 | 2472 | | |
| 2473 | + | |
2468 | 2474 | | |
2469 | 2475 | | |
2470 | 2476 | | |
| |||
2482 | 2488 | | |
2483 | 2489 | | |
2484 | 2490 | | |
2485 | | - | |
2486 | | - | |
| 2491 | + | |
| 2492 | + | |
2487 | 2493 | | |
| 2494 | + | |
2488 | 2495 | | |
2489 | 2496 | | |
2490 | 2497 | | |
| |||
0 commit comments