summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/zstd/bytebuf.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd/bytebuf.go')
-rw-r--r--vendor/github.com/klauspost/compress/zstd/bytebuf.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/bytebuf.go b/vendor/github.com/klauspost/compress/zstd/bytebuf.go
index 4a8460476..3538063f1 100644
--- a/vendor/github.com/klauspost/compress/zstd/bytebuf.go
+++ b/vendor/github.com/klauspost/compress/zstd/bytebuf.go
@@ -116,6 +116,9 @@ func (r *readerWrapper) readByte() (byte, error) {
}
func (r *readerWrapper) skipN(n int) error {
- _, err := io.CopyN(ioutil.Discard, r.r, int64(n))
+ n2, err := io.CopyN(ioutil.Discard, r.r, int64(n))
+ if n2 != int64(n) {
+ err = io.ErrUnexpectedEOF
+ }
return err
}