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

Fix Integer Overflow in Allocate Function #147

Merged
merged 2 commits into from
Jul 29, 2024

Conversation

pendolf
Copy link
Contributor

@pendolf pendolf commented May 25, 2024

This PR addresses an integer overflow issue in the Allocate function. When the sum of given ratios exceeds the maximum value for an int64, it results in a negative value, causing runtime errors. This fix includes:

  • Updating the Allocate function to check for potential overflows.
  • Adding a new test case to ensure the error is correctly handled.

Related Issues

@Rhymond Rhymond merged commit bc15d4d into Rhymond:master Jul 29, 2024
4 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.

Integer overflow in the Allocate
2 participants