Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

avoid index out of slice range

chrislu12f8251d3275
diff --git a/weed/filer/reader_cache.go b/weed/filer/reader_cache.go
index 0a7c83de71..1918cacf8e 100644
--- a/weed/filer/reader_cache.go
+++ b/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
}