Skip to content

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

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

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

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.14): 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.14.

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)
@gpshead
gpshead enabled auto-merge (squash) October 31, 2026 20:56
@gpshead
gpshead merged commit 509eb96 into python:3.14 Oct 31, 2026
49 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Sprint Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant