diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-12 12:35:46 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-12 12:35:46 (GMT) |
commit | 6b4b6e956eaaff272fa4ffe0221a9cc8ef07882f (patch) | |
tree | c4dfce052c592d8f58cf05b1fdccc9e5fd415653 /Objects | |
parent | ae08687c3b4956f21e882593e215cf3f4bd5c904 (diff) | |
parent | 84293aff9fec20cb903bf1242c28404c671c56d1 (diff) | |
download | cpython-6b4b6e956eaaff272fa4ffe0221a9cc8ef07882f.zip cpython-6b4b6e956eaaff272fa4ffe0221a9cc8ef07882f.tar.gz cpython-6b4b6e956eaaff272fa4ffe0221a9cc8ef07882f.tar.bz2 |
Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
when decode astral characters.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 273536e..b7a3fa5 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -4816,7 +4816,7 @@ _Py_DecodeUTF8_surrogateescape(const char *s, Py_ssize_t size) #if SIZEOF_WCHAR_T == 4 assert(0); #else - assert(Py_UNICODE_IS_SURROGATE(ch)); + assert(ch > 0xFFFF && ch <= MAX_UNICODE); /* compute and append the two surrogates: */ unicode[outpos++] = (wchar_t)Py_UNICODE_HIGH_SURROGATE(ch); unicode[outpos++] = (wchar_t)Py_UNICODE_LOW_SURROGATE(ch); |