Fix index overflow in quickPartition methods.#17
Open
bkmacy wants to merge 1 commit into
Open
Conversation
Codecov Report
@@ Coverage Diff @@
## master #17 +/- ##
============================================
- Coverage 40.85% 40.84% -0.01%
- Complexity 7221 7222 +1
============================================
Files 264 264
Lines 63167 63167
Branches 10299 10299
============================================
- Hits 25809 25803 -6
- Misses 35659 35663 +4
- Partials 1699 1701 +2
Continue to review full report at Codecov.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When sorting a large array where the length is more than half the maximum integer value, one of the computed indices in quickPartition may overflow, which can lead to a negative array index. This patch fixes the overflow issue using longs to compute the index value.