Bound bulk extraction by indexed decoded lengths #4
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lynxnathan--rage-tools-vi!4
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@yefan911 on GitHub · 2026-11-27 05:18 UTC · original
yefan911:fix/bulk-extract-bounds→main· +110 −2 · 3 files · 1 commits · openSummary
bulk_extract.extract_onereceives the index's expected decoded length, but currently ignores it and calls unboundedzlib.decompress. Incorrect lengths are silently accepted and written; a small indexed size also does not constrain the allocation of a highly compressed stream.For a known positive size, use the incremental decoder with an output limit of
expected + 1. Require both the exact decoded length and a complete stream before creating any output directory or file. Keep zero/unknown-length entries on the existing path. Update the module description to make that qualification explicit.Validation
tests/test_extraction_tools.pyandtests/test_robustness.py --rounds 200pass on native Windows.git diff --checkpasses.Tests use generated compressed bytes and temporary directories only. No game archives, assets, extracted samples, private SDK materials, or game-derived fixtures were accessed. The append-only journal records the synthetic reproduction and commands.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.