-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
boundscheck & partitioning fingerprints between blocks #11237
Conversation
1c4cb52
to
8a79e82
Compare
bounded := boundedRequests{ | ||
bounds: block, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the slice reqs
not need to be allocated?
|
||
// reqs models a set of requests covering many fingerprints. | ||
// consumers models a set of blocks covering different fingerprint ranges | ||
func partitionFingerprintRange(reqs [][]model.Fingerprint, blocks []FingerprintBounds) (res []boundedRequests) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a named return value, but you return the value also explicitly.
Personally I'm not a big fan of named return values, because they can hide allocation problems.
Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
8a79e82
to
50ea652
Compare
Trivy scan found the following vulnerabilities:
|
Adds a few utilities for comparing fingerprints to blocks that cover a specific fingerprint range. Will likely need to be refactored with more comprehensive types, but the logic still applies.
Adds a few utilities for comparing fingerprints to blocks that cover a specific fingerprint range. Will likely need to be refactored with more comprehensive types, but the logic still applies.
Adds a few utilities for comparing fingerprints to blocks that cover a specific fingerprint range. Will likely need to be refactored with more comprehensive types, but the logic still applies.