bpo-38876: Raise pickle.UnpicklingError when loading an item from memo for invalid input (GH-17335)
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. https://bugs.python.org/issue38876 https://bugs.python.org/issue38876
C
Claudiu Popa committed
6f03b236c17c96bc9f8a004ffa7e7ae0542e9cac
Parent: e407646
Committed by Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
on 11/24/2019, 7:15:08 PM