pdftract/crates
jedarden 2663c932aa feat(pdftract-2gbu9): enhance linearization detection with robust substring matching
Enhanced the `detect_linearization` function to avoid false matches when
extracting keys from the linearization dictionary. Previous implementation
could incorrectly match "/L" within "/Linearized" or "/H" within other keys.

Changes:
- Added loop-based search in extract_number helper to skip substring matches
- Added similar substring-aware logic for /H (hint stream) parsing
- Added new diagnostic codes for /Prev chain error handling
- Added comprehensive verification note

Acceptance criteria PASS:
- Non-linearized files return None
- Valid linearized dict detected correctly
- File size mismatch (incremental update) invalidates linearization
- No /H entry returns None for hint_stream_offset
- Random bytes never panic (proptest)
- Forward scan disabled for linearized files
- INV-8 maintained (no panics on arbitrary input)

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-05-22 19:15:47 -04:00
..
pdftract-cer-diff fix(pdftract-2t9): update regression-corpus step image and secret 2026-05-18 01:20:53 -04:00
pdftract-cli fix(pdftract-2a6rk): fix xref.rs u64 literal overflow in proptest 2026-05-22 17:26:27 -04:00
pdftract-core feat(pdftract-2gbu9): enhance linearization detection with robust substring matching 2026-05-22 19:15:47 -04:00
pdftract-py fix(pdftract-2a6rk): fix xref.rs u64 literal overflow in proptest 2026-05-22 17:26:27 -04:00