消息 [234731]
I think the changeset which made decoders to use _PyUnicodeWriter (issue16311)
is responsible of the regression.
For example consider b'\x80abc'.decode('utf-8', 'backslashreplace').
The writer reserves string buffer with size 4 (every byte produces at most 1
character). First byte is incorrect and replaced by 4-character string
'\\x80'. The writer increases min_length but doesn't resize the buffer because
its size is enough to write replacement string. But following writes of ASCII
characters cause buffer overflow. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2015-01-26 10:26:42 | serhiy.storchaka | 修改 | recipients:
+ serhiy.storchaka, vstinner, Arfrever, python-dev |
| 2015-01-26 10:26:42 | serhiy.storchaka | 链接 | issue23321 messages |
| 2015-01-26 10:26:41 | serhiy.storchaka | 创建 | |
|