diff --git a/registry/storage/driver/inmemory/mfs.go b/registry/storage/driver/inmemory/mfs.go index 9a2865f9..24eeef98 100644 --- a/registry/storage/driver/inmemory/mfs.go +++ b/registry/storage/driver/inmemory/mfs.go @@ -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 }