Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixed small bug in resize.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
  • Loading branch information
bwplotka committed Jan 21, 2020
commit bd2b506b2e26bee7955b98daa589d0d4230133de
2 changes: 1 addition & 1 deletion pkg/store/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ func resizePostings(b []byte) ([]byte, error) {

// 4 for postings number of entries, then 4, foreach each big endian posting.
size := 4 + n*4
if len(b) <= size {
if len(b) < size {
return nil, encoding.ErrInvalidSize
}
return b[:size], nil
Expand Down