Commit ff3e5e37 authored by Georg Brandl's avatar Georg Brandl

Fix unicode_aswidechar() for 4b unicode and 2b wchar_t (AIX).

parent 51c11622
......@@ -7,6 +7,12 @@ What's New in Python 3.2.6?
*Release date: TBD*
Core and Builtins
-----------------
- Issue #19529: Fix a potential crash in converting Unicode objects to wchar_t
when Py_UNICODE is 4 bytes but wchar_t is 2 bytes, for example on AIX.
Library
-------
......
......@@ -1267,7 +1267,7 @@ unicode_aswidechar(PyUnicodeObject *unicode,
Py_ssize_t nchar;
u = PyUnicode_AS_UNICODE(unicode);
uend = u + PyUnicode_GET_SIZE(u);
uend = u + PyUnicode_GET_SIZE(unicode);
if (w != NULL) {
worig = w;
wend = w + size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment