File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,6 +166,8 @@ Core and Builtins
166166Library
167167-------
168168
169+ - Issue #18559: Fix NULL pointer dereference error in _pickle module
170+
169171- Issue #18556: Check the return type of PyUnicode_AsWideChar() in ctype's
170172 U_set().
171173
Original file line number Diff line number Diff line change @@ -4836,9 +4836,10 @@ load_binget(UnpicklerObject *self)
48364836 value = _Unpickler_MemoGet (self , idx );
48374837 if (value == NULL ) {
48384838 PyObject * key = PyLong_FromSsize_t (idx );
4839- if (! PyErr_Occurred ())
4839+ if (key != NULL ) {
48404840 PyErr_SetObject (PyExc_KeyError , key );
4841- Py_DECREF (key );
4841+ Py_DECREF (key );
4842+ }
48424843 return -1 ;
48434844 }
48444845
@@ -4861,9 +4862,10 @@ load_long_binget(UnpicklerObject *self)
48614862 value = _Unpickler_MemoGet (self , idx );
48624863 if (value == NULL ) {
48634864 PyObject * key = PyLong_FromSsize_t (idx );
4864- if (! PyErr_Occurred ())
4865+ if (key != NULL ) {
48654866 PyErr_SetObject (PyExc_KeyError , key );
4866- Py_DECREF (key );
4867+ Py_DECREF (key );
4868+ }
48674869 return -1 ;
48684870 }
48694871
You can’t perform that action at this time.
0 commit comments