Skip to content

[3.15] gh-160314: Raise for a damaged later stream in lzma and bz2 (GH-160315) - #161034

Merged
gpshead merged 2 commits into
python:3.15from
gpshead:backport-a4f8047-3.15
Oct 31, 2026
Merged

gpshead merged 2 commits into
python:3.15from
gpshead:backport-a4f8047-3.15

Conversation

@gpshead

@gpshead gpshead commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

A damaged .xz or bzip2 stream that followed another stream was taken
for trailing data and silently ignored. Leftover data that starts with
the stream magic is now treated as a stream, as gzip does.

ANT-2026-3TVAVL5A
(cherry picked from commit a4f8047)

Manual backport notes (3.15): the automated backport conflicted only in
Doc/library/bz2.rst. A second commit drops the versionchanged notes
the original added to Doc/library/bz2.rst and Doc/library/lzma.rst,
as bugfix-level behavior changes are not recorded that way; they are
being removed on main as well. test_bz2, test_lzma and the other
compression-related tests pass on 3.15.

Issue: gh-160314

…bz2 (pythonGH-160315)

A damaged .xz or bzip2 stream that followed another stream was taken
for trailing data and silently ignored.  Leftover data that starts with
the stream magic is now treated as a stream, as gzip does.

ANT-2026-3TVAVL5A

(cherry picked from commit a4f8047)
@read-the-docs-community

Copy link
Copy Markdown

@gpshead
gpshead enabled auto-merge (squash) October 31, 2026 20:56
@gpshead
gpshead merged commit 0a312db into python:3.15 Oct 31, 2026
53 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant