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
f446d217
Commit
f446d217
authored
Jul 26, 2013
by
Christian Heimes
Browse files
Options
Browse Files
Download
Plain Diff
Issue #18559: Fix NULL pointer dereference error in _pickle module
parents
d4095d95
9ee5c37c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
Misc/NEWS
Misc/NEWS
+2
-0
Modules/_pickle.c
Modules/_pickle.c
+6
-4
No files found.
Misc/NEWS
View file @
f446d217
...
...
@@ -166,6 +166,8 @@ Core and Builtins
Library
-------
-
Issue
#
18559
:
Fix
NULL
pointer
dereference
error
in
_pickle
module
-
Issue
#
18556
:
Check
the
return
type
of
PyUnicode_AsWideChar
()
in
ctype
's
U_set().
...
...
Modules/_pickle.c
View file @
f446d217
...
...
@@ -4836,9 +4836,10 @@ load_binget(UnpicklerObject *self)
value
=
_Unpickler_MemoGet
(
self
,
idx
);
if
(
value
==
NULL
)
{
PyObject
*
key
=
PyLong_FromSsize_t
(
idx
);
if
(
!
PyErr_Occurred
())
if
(
key
!=
NULL
)
{
PyErr_SetObject
(
PyExc_KeyError
,
key
);
Py_DECREF
(
key
);
Py_DECREF
(
key
);
}
return
-
1
;
}
...
...
@@ -4861,9 +4862,10 @@ load_long_binget(UnpicklerObject *self)
value
=
_Unpickler_MemoGet
(
self
,
idx
);
if
(
value
==
NULL
)
{
PyObject
*
key
=
PyLong_FromSsize_t
(
idx
);
if
(
!
PyErr_Occurred
())
if
(
key
!=
NULL
)
{
PyErr_SetObject
(
PyExc_KeyError
,
key
);
Py_DECREF
(
key
);
Py_DECREF
(
key
);
}
return
-
1
;
}
...
...
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