Fix incorrect error handling in _pickle.Unpickler.__init__() (GH-9630)
_pickle.Unpickler.__init__() should return -1 if Pdata_New() fails, not 1.
(cherry picked from commit 4b430e5f69
)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
This commit is contained in:
parent
007fda436f
commit
758ad54dac
|
@ -6804,7 +6804,7 @@ _pickle_Unpickler___init___impl(UnpicklerObject *self, PyObject *file,
|
|||
|
||||
self->stack = (Pdata *)Pdata_New();
|
||||
if (self->stack == NULL)
|
||||
return 1;
|
||||
return -1;
|
||||
|
||||
self->memo_size = 32;
|
||||
self->memo = _Unpickler_NewMemo(self->memo_size);
|
||||
|
|
Loading…
Reference in New Issue