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.

classification
Title: Check result of PyUnicode_AsUTF8
Type: crash Stage: resolved
Components: Extension Modules, Interpreter Core Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2016-11-16 17:46 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
check-PyUnicode_AsUTF8.patch serhiy.storchaka, 2016-11-16 17:46 review
Messages (3)
msg280972 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-11-16 17:46
The function PyUnicode_AsUTF8() can fail, but not all callers check for error. Proposed patch adds missed checks. In some places the code is rewritten to not use PyUnicode_AsUTF8() at all.
msg280982 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-11-16 19:57
_PyUnicode_AsString is just an outdated alias to PyUnicode_AsUTF8.
msg281252 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-11-20 06:48
New changeset 38f321a6be41 by Serhiy Storchaka in branch '3.5':
Issue #28715: Added error checks for PyUnicode_AsUTF8().
https://hg.python.org/cpython/rev/38f321a6be41

New changeset 0bb8ab158042 by Serhiy Storchaka in branch '3.6':
Issue #28715: Added error checks for PyUnicode_AsUTF8().
https://hg.python.org/cpython/rev/0bb8ab158042

New changeset 9cd42ed64bdb by Serhiy Storchaka in branch 'default':
Issue #28715: Added error checks for PyUnicode_AsUTF8().
https://hg.python.org/cpython/rev/9cd42ed64bdb
History
Date User Action Args
2022-04-11 14:58:39adminsetgithub: 72901
2016-11-20 06:49:12serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2016-11-20 06:48:49python-devsetnosy: + python-dev
messages: + msg281252
2016-11-20 06:47:32serhiy.storchakasetassignee: serhiy.storchaka
2016-11-16 19:57:55serhiy.storchakasetmessages: + msg280982
2016-11-16 17:46:27serhiy.storchakacreate