blob: 43b25acc39d2eed04c126e157aaa125aa2308c43 (
plain)
1
2
3
4
5
6
7
8
9
|
Raise pickle.UnpicklingError when loading an item from memo for invalid
input
The previous code was raising a `KeyError` for both the Python and C
implementation. This was caused by the specified index of an invalid input
which did not exist in the memo structure, where the pickle stores what
objects it has seen. The malformed input would have caused either a `BINGET`
or `LONG_BINGET` load from the memo, leading to a `KeyError` as the
determined index was bogus. Patch by Claudiu Popa
|