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
50ff939c
Commit
50ff939c
authored
Oct 25, 2016
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug build.
parent
e75b96da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
Misc/NEWS
Misc/NEWS
+3
-0
Objects/unicodeobject.c
Objects/unicodeobject.c
+2
-10
No files found.
Misc/NEWS
View file @
50ff939c
...
...
@@ -10,6 +10,9 @@ Release date: TBA
Core and Builtins
-----------------
- Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
build.
Library
-------
...
...
Objects/unicodeobject.c
View file @
50ff939c
...
...
@@ -3059,24 +3059,16 @@ PyUnicode_AsDecodedObject(PyObject *unicode,
const
char
*
encoding
,
const
char
*
errors
)
{
PyObject
*
v
;
if
(
!
PyUnicode_Check
(
unicode
))
{
PyErr_BadArgument
();
goto
onError
;
return
NULL
;
}
if
(
encoding
==
NULL
)
encoding
=
PyUnicode_GetDefaultEncoding
();
/* Decode via the codec registry */
v
=
PyCodec_Decode
(
unicode
,
encoding
,
errors
);
if
(
v
==
NULL
)
goto
onError
;
return
unicode_result
(
v
);
onError:
return
NULL
;
return
PyCodec_Decode
(
unicode
,
encoding
,
errors
);
}
PyObject
*
...
...
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