Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: uint256 single value overflow checker #456

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Conversation

notJoon
Copy link
Member

@notJoon notJoon commented Jan 3, 2025

Description

The IsOverflow() function checks if a uint256 number has overflowed by examining the 255th bit (the most significant bit). In uint256, the valid range is from 0 to 2^255-1, so any number with the 255th bit set is considered an overflow.

@notJoon notJoon requested review from onlyhyde, r3v4s and jinoosss January 3, 2025 12:20
Copy link

sonarqubecloud bot commented Jan 3, 2025

Copy link
Member

@r3v4s r3v4s left a comment

Choose a reason for hiding this comment

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

nice catch

@notJoon notJoon merged commit f2badf4 into main Jan 3, 2025
2 checks passed
@notJoon notJoon deleted the overflow-checker branch January 3, 2025 14:01
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.

3 participants