We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cef70e commit 7f437bfCopy full SHA for 7f437bf
database/immutable/immutable.go
@@ -82,6 +82,13 @@ func (i *ImmutableDb) getChunkNamesFromPoint(
82
for lowerBound <= upperBound {
83
// Get chunk in the middle of the current bounds
84
middlePoint := (lowerBound + upperBound) / 2
85
+ if middlePoint < 0 || middlePoint >= len(chunkNames) {
86
+ return nil, fmt.Errorf(
87
+ "immutable DB: middlePoint %d out of bounds (chunkNames len=%d)",
88
+ middlePoint,
89
+ len(chunkNames),
90
+ )
91
+ }
92
middleChunkName := chunkNames[middlePoint]
93
middleSecondary, err := i.getChunkSecondaryIndex(middleChunkName)
94
if err != nil {
0 commit comments