Merge pull request #259 from barakmich/leveldb_iterator_overflow
Fix LevelDB deleted-triple iterator stack overflow bug
This commit is contained in:
commit
5b645037d2
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 !it.isLiveValue(it.iter.Value()) {
|
||||
ok := it.iter.Next()
|
||||
if !ok {
|
||||
it.Close()
|
||||
return false
|
||||
}
|
||||
return it.Next()
|
||||
}
|
||||
out := make([]byte, len(it.iter.Key()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue