Skip to content

fix(stdune): enforce compact position field bounds - #16180

Merged
rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-wwkyurrxkpys
Aug 25, 2026
Merged

fix(stdune): enforce compact position field bounds#16180
rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-wwkyurrxkpys

Conversation

@rgrinberg

Copy link
Copy Markdown
Member

Validate compact-position fields against their actual bit masks, including rejecting negative values, before encoding them.

This prevents boundary values from being truncated and lets same-line locations fall back to the wider encoding. Extend the compact-position tests to cover both cases.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg
rgrinberg merged commit b2b24d7 into ocaml:main Aug 25, 2026
39 checks passed
@Alizter Alizter added this to the 3.25.0 milestone Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants