Repository navigation
fix: preserve NUP member names during implicit reads - #1185
Merged
hckrman101 merged 1 commit intoNov 9, 2026
Merged
Conversation
Resolve omitted names in the shared packing classifier so read and copy_to agree for raw .zs frames with equal compressed and decoded lengths. Assisted-by: OpenAI Codex Co-Authored-By: OpenAI Codex <noreply@openai.com>
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.
What this fixes
Reading a raw
.zspackage member without supplying its filename can decompress the game file itself when compressed and decoded lengths happen to match. A prefix read then returns decoded payload bytes instead of the file's real header.Why merge
Change
nx2/nup.py: resolve omitted names in the shared packing classifier.nx2/test_nup_read_name.py: check five synthetic compatibility cases and caller-supplied names.Tested
python -I -B nx2/test_nup_read_name.pyFails on the old code, passes now. Real Zstd decoding verifies the fixed 49-byte synthetic frame. Local Windows CPU-only checks cover raw
.zs, explicit codec1, legacy exefs, plain exefs and nested.zs.python -I -B tests/run_all.py --jobs 1 --strict nupThis command exits nonzero on the existing Windows symlink-privilege failures noted below. The new regression, codec and verification checks pass; 209 tracked Python files compile. Fresh Windows/Linux CI passes all five jobs, including the new regression.
Not covered
No game data is included.