This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2016年10月25日 08:42 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| curses-PyUnicode_AsEncodedString.patch | serhiy.storchaka, 2016年10月25日 08:42 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg279377 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年10月25日 08:42 | |
PyUnicode_AsEncodedObject() can return an object of arbitrary type, while PyUnicode_AsEncodedString() always returns bytes. The code that uses PyUnicode_AsEncodedObject() in the _curses module expects bytes, but does not check the type of the result. This can cause undefined behavior, including a crash. Using PyUnicode_AsEncodedString() is more correct in this case. |
|||
| msg279409 - (view) | Author: Josh Rosenberg (josh.r) * (Python triager) | Date: 2016年10月25日 14:41 | |
LGTM. |
|||
| msg279547 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年10月27日 16:33 | |
New changeset bea48e72cae5 by Serhiy Storchaka in branch '3.5': Issue #28526: Use PyUnicode_AsEncodedString() instead of https://hg.python.org/cpython/rev/bea48e72cae5 New changeset fe9f361f3751 by Serhiy Storchaka in branch '3.6': Issue #28526: Use PyUnicode_AsEncodedString() instead of https://hg.python.org/cpython/rev/fe9f361f3751 New changeset a6548e230ed6 by Serhiy Storchaka in branch 'default': Issue #28526: Use PyUnicode_AsEncodedString() instead of https://hg.python.org/cpython/rev/a6548e230ed6 |
|||
| msg279548 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年10月27日 16:34 | |
Thank you for your review Josh. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:38 | admin | set | github: 72712 |
| 2016年10月27日 16:34:33 | serhiy.storchaka | set | status: open -> closed versions: - Python 2.7 messages: + msg279548 resolution: fixed stage: patch review -> resolved |
| 2016年10月27日 16:33:48 | python-dev | set | nosy:
+ python-dev messages: + msg279547 |
| 2016年10月25日 14:41:36 | josh.r | set | nosy:
+ josh.r messages: + msg279409 |
| 2016年10月25日 08:42:57 | serhiy.storchaka | link | issue28426 dependencies |
| 2016年10月25日 08:42:38 | serhiy.storchaka | create | |