diff options
Diffstat (limited to 'src/pkg/image/tiff/buffer.go')
| -rw-r--r-- | src/pkg/image/tiff/buffer.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/pkg/image/tiff/buffer.go b/src/pkg/image/tiff/buffer.go index 7c0714225..27533c604 100644 --- a/src/pkg/image/tiff/buffer.go +++ b/src/pkg/image/tiff/buffer.go @@ -4,10 +4,7 @@ package tiff -import ( - "io" - "os" -) +import "io" // buffer buffers an io.Reader to satisfy io.ReaderAt. type buffer struct { @@ -15,11 +12,11 @@ type buffer struct { buf []byte } -func (b *buffer) ReadAt(p []byte, off int64) (int, os.Error) { +func (b *buffer) ReadAt(p []byte, off int64) (int, error) { o := int(off) end := o + len(p) if int64(end) != off+int64(len(p)) { - return 0, os.EINVAL + return 0, io.ErrUnexpectedEOF } m := len(b.buf) |
