Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e1e1e64f
Commit
e1e1e64f
authored
Nov 12, 2016
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
when decode astral characters.
parents
66c1d3d5
742dd004
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
Misc/NEWS
Misc/NEWS
+3
-0
Objects/unicodeobject.c
Objects/unicodeobject.c
+1
-1
No files found.
Misc/NEWS
View file @
e1e1e64f
...
@@ -10,6 +10,9 @@ Release date: TBA
...
@@ -10,6 +10,9 @@ Release date: TBA
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
when decode astral characters. Patch by Xiang Zhang.
- Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
- Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
build.
build.
...
...
Objects/unicodeobject.c
View file @
e1e1e64f
...
@@ -4856,7 +4856,7 @@ _Py_DecodeUTF8_surrogateescape(const char *s, Py_ssize_t size)
...
@@ -4856,7 +4856,7 @@ _Py_DecodeUTF8_surrogateescape(const char *s, Py_ssize_t size)
#if SIZEOF_WCHAR_T == 4
#if SIZEOF_WCHAR_T == 4
assert
(
0
);
assert
(
0
);
#else
#else
assert
(
Py_UNICODE_IS_SURROGATE
(
ch
)
);
assert
(
ch
>
0xFFFF
&&
ch
<=
MAX_UNICODE
);
/* compute and append the two surrogates: */
/* compute and append the two surrogates: */
unicode
[
outpos
++
]
=
(
wchar_t
)
Py_UNICODE_HIGH_SURROGATE
(
ch
);
unicode
[
outpos
++
]
=
(
wchar_t
)
Py_UNICODE_HIGH_SURROGATE
(
ch
);
unicode
[
outpos
++
]
=
(
wchar_t
)
Py_UNICODE_LOW_SURROGATE
(
ch
);
unicode
[
outpos
++
]
=
(
wchar_t
)
Py_UNICODE_LOW_SURROGATE
(
ch
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment