]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-154848: Enforce frame boundaries in the C unpickler (GH-154893)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 31 Jul 2026 09:04:30 +0000 (12:04 +0300)
committerGitHub <noreply@github.com>
Fri, 31 Jul 2026 09:04:30 +0000 (12:04 +0300)
commit10a84540c2c2533e31f5f0649cc4e4afdd991ba2
tree3bb1bc0f3804987833beac5f041bb196f31f4694
parentadf836ebddd89793afb6d43a79d0a0739ee5514b
gh-154848: Enforce frame boundaries in the C unpickler (GH-154893)

The C unpickler did not enforce PEP 3154 frame boundaries: an opcode or its
argument could straddle a frame, and a new frame could begin before the
previous one ended.  Such reads now raise UnpicklingError, as in the pure
Python implementation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Lib/test/pickletester.py
Lib/test/test_pickle.py
Misc/NEWS.d/next/Library/2026-07-29-18-30-00.gh-issue-154848.Fr4meB.rst [new file with mode: 0644]
Modules/_pickle.c