Skip to content

fix(sol-types): remove unsound unwrap_unchecked in suffix_offset#1083

Merged
DaniPopes merged 3 commits intomainfrom
dani/fix-suffix-offset-soundness
Mar 20, 2026
Merged

fix(sol-types): remove unsound unwrap_unchecked in suffix_offset#1083
DaniPopes merged 3 commits intomainfrom
dani/fix-suffix-offset-soundness

Conversation

@DaniPopes
Copy link
Member

Closes #1082

Replace unsafe { *self.suffix_offset.last().unwrap_unchecked() } with a safe .last().copied().expect(), which matches the documented panicking behavior.

@DaniPopes DaniPopes requested a review from mattsse as a code owner March 12, 2026 13:51
@DaniPopes DaniPopes enabled auto-merge (squash) March 12, 2026 13:52
@github-project-automation github-project-automation bot moved this to Reviewed in Alloy Mar 20, 2026
@DaniPopes DaniPopes merged commit 05c1658 into main Mar 20, 2026
31 checks passed
@DaniPopes DaniPopes deleted the dani/fix-suffix-offset-soundness branch March 20, 2026 14:57
@github-project-automation github-project-automation bot moved this from Reviewed to Done in Alloy Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug] Soundness Bug in sol-types

2 participants