mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:45:53 +01:00
[PR #1159] awc_markers: reject incomplete reads (AWC-MARKERS-SHORT-READ) #1192
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1192
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1159
Author: @Taffyyy-ops
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/awc-markers-short-read📝 Commits (1)
4f39d9eawc_markers: reject incomplete reads (AWC-MARKERS-SHORT-READ)📊 Changes
2 files changed (+52 additions, -1 deletions)
View changed files
➕
tests/test_awc_markers_short_read.py(+46 -0)📝
tools/awc_markers.py(+6 -1)📄 Description
Item ID:
AWC-MARKERS-SHORT-READRejects truncated or short reads in
tools/awc_markers.pyby raisingOSErrorinstead of silently parsing incomplete windows or returning partial counts with exit code0.Changes
tools/awc_markers.py(iter_banks,_read): Checks thatfh.read(WINDOW + 3)returns at leastmin(WINDOW + 3, size - pos)bytes during bank scanning and that_read(fh, at, size)returns allsizebytes, raising descriptiveOSErrorexceptions on short reads.tests/test_awc_markers_short_read.py: Adds synthetic tests verifyingOSErroron truncated bank scans as well as truncated marker and metadata chunk reads.Verification
python -I scripts/check_no_game_data.py).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.