File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ Core and Builtins
5252Library
5353-------
5454
55+ - Issue #18559: Fix NULL pointer dereference error in _pickle module
56+
5557- Issue #18556: Check the return value of a PyUnicode_AsWideChar() call in
5658 ctypes' U_set().
5759
Original file line number Diff line number Diff line change @@ -4816,9 +4816,10 @@ load_binget(UnpicklerObject *self)
48164816 value = _Unpickler_MemoGet (self , idx );
48174817 if (value == NULL ) {
48184818 PyObject * key = PyLong_FromSsize_t (idx );
4819- if (! PyErr_Occurred ())
4819+ if (key != NULL ) {
48204820 PyErr_SetObject (PyExc_KeyError , key );
4821- Py_DECREF (key );
4821+ Py_DECREF (key );
4822+ }
48224823 return -1 ;
48234824 }
48244825
@@ -4841,9 +4842,10 @@ load_long_binget(UnpicklerObject *self)
48414842 value = _Unpickler_MemoGet (self , idx );
48424843 if (value == NULL ) {
48434844 PyObject * key = PyLong_FromSsize_t (idx );
4844- if (! PyErr_Occurred ())
4845+ if (key != NULL ) {
48454846 PyErr_SetObject (PyExc_KeyError , key );
4846- Py_DECREF (key );
4847+ Py_DECREF (key );
4848+ }
48474849 return -1 ;
48484850 }
48494851
You can’t perform that action at this time.
0 commit comments