mirror of https://github.com/python/cpython
Fix unicode_aswidechar() for 4b unicode and 2b wchar_t (AIX).
This commit is contained in:
parent
51c116223e
commit
ff3e5e3779
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue