Skip to content

Fix matrix view overflow 1418 - #1622

Open
jorgeandrecastro wants to merge 2 commits into
dimforge:mainfrom
jorgeandrecastro:fix-matrix-view-overflow-1418
Open

jorgeandrecastro wants to merge 2 commits into
dimforge:mainfrom
jorgeandrecastro:fix-matrix-view-overflow-1418

Conversation

@jorgeandrecastro

@jorgeandrecastro jorgeandrecastro commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Description:

Changes Made:

  • Updated offset and dimension calculations in assert_view_index (src/base/matrix_view.rs) to use .checked_add() and .checked_mul().

  • This prevents silent integer wrap-arounds in release mode that could lead to memory corruption (munmap_chunk).

Im open to any feedback or alternative approaches. Thank you!

@jorgeandrecastro
jorgeandrecastro force-pushed the fix-matrix-view-overflow-1418 branch from 7c711c3 to be8e575 Compare September 30, 2026 20:30

This branch has not been deployed

No deployments
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.

2 participants