Fix LevelDB deleted-triple iterator stack overflow bug
This commit is contained in:
parent
7c0d8b28b0
commit
3f022227ce
1 changed files with 5 additions and 0 deletions
|
|
@ -139,6 +139,11 @@ func (it *Iterator) Next() bool {
|
||||||
}
|
}
|
||||||
if bytes.HasPrefix(it.iter.Key(), it.nextPrefix) {
|
if bytes.HasPrefix(it.iter.Key(), it.nextPrefix) {
|
||||||
if !it.isLiveValue(it.iter.Value()) {
|
if !it.isLiveValue(it.iter.Value()) {
|
||||||
|
ok := it.iter.Next()
|
||||||
|
if !ok {
|
||||||
|
it.Close()
|
||||||
|
return false
|
||||||
|
}
|
||||||
return it.Next()
|
return it.Next()
|
||||||
}
|
}
|
||||||
out := make([]byte, len(it.iter.Key()))
|
out := make([]byte, len(it.iter.Key()))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue