Browse Source

avoid index out of slice range

pull/4652/head
chrislu 2 years ago
parent
commit
12f8251d32
  1. 2
      weed/filer/reader_cache.go

2
weed/filer/reader_cache.go

@ -208,7 +208,7 @@ func (s *SingleChunkCacher) readChunkAt(buf []byte, offset int64) (int, error) {
return 0, s.err
}
if len(s.data) == 0 {
if len(s.data) <= int(offset) {
return 0, nil
}

Loading…
Cancel
Save