Repository navigation
Commit e0c66fe
committed
gh-160811: fix TextIOWrapper.tell() after seek() past a carriage return
seek() to a cookie with chars_to_skip replayed the input chunk without updating the bytes-per-char ratio, so tell() could compute skip_bytes larger than the snapshot buffer. In the C implementation this read past the end of the buffer, and _pyio returned a wrong position.1 parent e7ab898 commit e0c66fe
4 files changed
Lines changed: 32 additions & 0 deletions
File tree
- Lib
- test/test_io
- Misc/NEWS.d/next/Library
- Modules/_io
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2602 | 2602 | | |
2603 | 2603 | | |
2604 | 2604 | | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
2605 | 2609 | | |
2606 | 2610 | | |
2607 | 2611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
708 | 724 | | |
709 | 725 | | |
710 | 726 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2812 | 2812 | | |
2813 | 2813 | | |
2814 | 2814 | | |
| 2815 | + | |
2815 | 2816 | | |
2816 | 2817 | | |
2817 | 2818 | | |
| |||
2824 | 2825 | | |
2825 | 2826 | | |
2826 | 2827 | | |
| 2828 | + | |
2827 | 2829 | | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
2828 | 2836 | | |
2829 | 2837 | | |
2830 | 2838 | | |
| |||
0 commit comments