Skip to content

Use safe Layout::from_size_align (instead of unsafe from_size_align_unchecked), panicking with a capacity overflow if it fails.#89

Merged
emilio merged 1 commit into
mozilla:mainfrom
zachs18:layout-overflow-fix
Jun 22, 2026
Merged

Use safe Layout::from_size_align (instead of unsafe from_size_align_unchecked), panicking with a capacity overflow if it fails.#89
emilio merged 1 commit into
mozilla:mainfrom
zachs18:layout-overflow-fix

Conversation

@zachs18

@zachs18 zachs18 commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Fixes #88

…n_unchecked`), panicking with a capacity overflow if it fails.

@emilio emilio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@emilio emilio merged commit e903080 into mozilla:main Jun 22, 2026
5 checks passed
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.

Soundness: Integer overflow in layout calculation on near-isize::MAX capacities

2 participants