From c5bb224bf958f69b3830c75b1aa3f4b80925b113 Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Tue, 25 Nov 2014 21:43:12 -0800 Subject: [PATCH] Fix read offset check for inmemory driver Signed-off-by: Ahmet Alp Balkan --- storagedriver/inmemory/driver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storagedriver/inmemory/driver.go b/storagedriver/inmemory/driver.go index 0d28b2da..98b068e9 100644 --- a/storagedriver/inmemory/driver.go +++ b/storagedriver/inmemory/driver.go @@ -67,7 +67,7 @@ func (d *Driver) ReadStream(path string, offset uint64) (io.ReadCloser, error) { contents, err := d.GetContent(path) if err != nil { return nil, err - } else if len(contents) < int(offset) { + } else if len(contents) <= int(offset) { return nil, storagedriver.InvalidOffsetError{Path: path, Offset: offset} }