Skip to content

Fix integer overflow in _checkCount(minimum:) - #60

Open
natecook1000 wants to merge 1 commit into
mainfrom
fix/checkcount-overflow
Open

Fix integer overflow in _checkCount(minimum:)#60
natecook1000 wants to merge 1 commit into
mainfrom
fix/checkcount-overflow

Conversation

@natecook1000

Copy link
Copy Markdown
Member

The current implementation adds the given minimum and _lowerBound, which can wrap around if the minimum is very large, incorrectly passing the size check. This change uses count instead, which is always the real upper bound for minimum.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've run Scripts/format.sh to correctly format my change
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

The current implementation adds the given `minimum` and
`_lowerBound`, which can wrap around if the minimum is
very large, incorrectly passing the size check. This change
uses `count` instead, which is always the real upper bound for
`minimum`.
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.

1 participant