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
d028eba9
Commit
d028eba9
authored
Oct 25, 2016
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug build.
parents
005fc331
50ff939c
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 @
d028eba9
...
...
@@ -10,6 +10,9 @@ Release date: TBA
Core and Builtins
-----------------
- Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
build.
- Issue #23782: Fixed possible memory leak in _PyTraceback_Add() and exception
loss in PyTraceBack_Here().
...
...
Objects/unicodeobject.c
View file @
d028eba9
...
...
@@ -3026,24 +3026,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