Skip to content

Commit

Permalink
Merge pull request #13681 from AdamKorcz/fuzz5
Browse files Browse the repository at this point in the history
server/storage/mvcc: fix oss-fuzz issue 44449
  • Loading branch information
serathius committed Feb 13, 2022
2 parents 489b308 + 029c354 commit bdb13e2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions server/storage/mvcc/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,14 @@ func (ti *treeIndex) Equal(bi index) bool {
equal := true

ti.tree.Ascend(func(item btree.Item) bool {
aki := item.(*keyIndex)
bki := b.tree.Get(item).(*keyIndex)
var aki, bki *keyIndex
var ok bool
if aki, ok = item.(*keyIndex); !ok {
return false
}
if bki, ok = b.tree.Get(item).(*keyIndex); !ok {
return false
}
if !aki.equal(bki) {
equal = false
return false
Expand Down

0 comments on commit bdb13e2

Please sign in to comment.