Skip to content

Commit

Permalink
Merge pull request #3815 from wy65701436/release/2.8-cp-3615
Browse files Browse the repository at this point in the history
[release/2.8] Fix panic in inmemory driver
  • Loading branch information
milosgajdos committed Apr 17, 2023
2 parents dc5b207 + ad5991d commit 82d6c3d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions registry/storage/driver/inmemory/mfs.go
Expand Up @@ -279,6 +279,9 @@ func (f *file) sectionReader(offset int64) io.Reader {
}

func (f *file) ReadAt(p []byte, offset int64) (n int, err error) {
if offset >= int64(len(f.data)) {
return 0, io.EOF
}
return copy(p, f.data[offset:]), nil
}

Expand Down

0 comments on commit 82d6c3d

Please sign in to comment.