Skip to content

fix(wasm): check integer bounds before conversion - #1107

Merged
andiwand merged 2 commits into
mainfrom
review/89-wasm-integer-bounds
Oct 5, 2026
Merged

andiwand merged 2 commits into
mainfrom
review/89-wasm-integer-bounds

Conversation

@andiwand

@andiwand andiwand commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

WebAssembly truncated fractional element IDs and sheet coordinates, and converted nonfinite or oversized inputs to integers without checking. A shared checked conversion now validates IDs, coordinates, rendering limits and view indices before use. Style-operation argument construction is inside the exception guard too.

Three regression cases fail on the parent; all 66 Node/WebAssembly tests pass after an Emscripten build. The existing unknown-ID test now also checks fractional and nonfinite inputs; two additional cases cover config and coordinates.

@andiwand
andiwand force-pushed the review/88-apple-decode-boundaries branch from e9ab47a to 9e9803b Compare October 5, 2026 21:08
Base automatically changed from review/88-apple-decode-boundaries to main October 5, 2026 21:12
andiwand and others added 2 commits October 5, 2026 23:12
A signed 64-bit target took any double down to -2^63, where doubles no
longer hold every integer. Both bounds now stop at 2^53 - 1.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gb1fLafqqzehpqPuU6uBfn
@andiwand
andiwand force-pushed the review/89-wasm-integer-bounds branch from e91b2a5 to d04c032 Compare October 5, 2026 21:14
@andiwand
andiwand merged commit a1a6409 into main Oct 5, 2026
23 checks passed
@andiwand
andiwand deleted the review/89-wasm-integer-bounds branch October 5, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant