Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
jhodges10
force-pushed
the
codex/limit-otioz-extraction
branch
2 times, most recently
from
October 30, 2026 19:50
5be297c to
590793b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2087 +/- ##
=======================================
Coverage 83.59% 83.59%
=======================================
Files 184 184
Lines 13632 13628 -4
Branches 1271 1272 +1
=======================================
- Hits 11395 11393 -2
+ Misses 2064 2062 -2
Partials 173 173
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Reading the timeline from an otioz bundle allocated the uncompressed size recorded in the zip file before reading any data. That size can be forged, so a 192 byte file could allocate 2GB of memory. The timeline is now read in chunks, so memory use follows the actual data, as it did in the Python adapter before AcademySoftwareFoundation#2021. This also removes the 2GB limit on the timeline size, which came from the 32-bit length passed to mz_zip_reader_entry_read() rather than a design decision, and checks the CRC of the timeline, which was ignored. Assisted-by: Claude Code / Claude Opus 5.5 Signed-off-by: Jeff Hodges <jeff@jeffhq.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jhodges10
force-pushed
the
codex/limit-otioz-extraction
branch
from
October 31, 2026 01:33
590793b to
83140e1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reading the timeline (
content.otio) from an otioz bundle allocated the uncompressed size recorded in the zip file before reading any data. That size can be forged, so a 192 byte file allocated 2 GB of memory before failing.The timeline is now read in chunks, so memory use follows the actual data. This restores the behavior of the Python adapter before #2021, which read the timeline with
zipfile. The up-front allocation came in with the C++ port and was not discussed in #1901, #2021, #2060, or #2083.Two related changes in the same function:
mz_zip_reader_entry_read(), not from a design decision, and the Python adapter had no such limit.content.otiocould be read without an error.There are no API changes and no new options. Extraction is unchanged and still has no size limits, so large bundles of uncompressed media are unaffected.
An earlier version of this PR added
ReadOptionslimits for the timeline size, total extracted size, and number of entries. Those were removed: fixed limits would reject legitimate large bundles (for example image sequences with one file per frame, or bundles over 16 GB), and metadata-heavy timelines commonly compress around 100x, so a compression ratio check cannot reliably tell them apart from a zip bomb.Tests
test_otioz_forged_timeline_size: a bundle whose recorded timeline size is forged to almost 2 GB reads correctly (it fails onmain), and a forged CRC is an error (it is accepted onmain).test_bundlewith the 8 GB ZIP64 case.CoreVersionMapGenerationTester, which also fails onmain.mainand 2.5 MB with this change.Assisted-by: Claude Code / Claude Opus 5.5
🤖 Generated with Claude Code