summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-29 10:37:59 -0400
committerGitHub <noreply@github.com>2020-05-29 10:37:59 -0400
commit0c750a9672d8078c655fb95f379600609b36dad4 (patch)
tree8ca8f81cdf302b1905d7a56f7c5c76ba5468c6f1 /vendor/github.com/klauspost
parent78c38460eb8ba9190d414f2da6a1414990cc6cfd (diff)
parentdc80267b594e41cf7e223821dc1446683f0cae36 (diff)
downloadpodman-0c750a9672d8078c655fb95f379600609b36dad4.tar.gz
podman-0c750a9672d8078c655fb95f379600609b36dad4.tar.bz2
podman-0c750a9672d8078c655fb95f379600609b36dad4.zip
Merge pull request #6207 from vrothberg/auth-header
add X-Registry-Auth header support
Diffstat (limited to 'vendor/github.com/klauspost')
-rw-r--r--vendor/github.com/klauspost/compress/zstd/blockdec.go6
-rw-r--r--vendor/github.com/klauspost/compress/zstd/decoder.go1
-rw-r--r--vendor/github.com/klauspost/compress/zstd/seqdec.go5
3 files changed, 11 insertions, 1 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/blockdec.go b/vendor/github.com/klauspost/compress/zstd/blockdec.go
index c2f855e75..19181caea 100644
--- a/vendor/github.com/klauspost/compress/zstd/blockdec.go
+++ b/vendor/github.com/klauspost/compress/zstd/blockdec.go
@@ -156,8 +156,12 @@ func (b *blockDec) reset(br byteBuffer, windowSize uint64) error {
}
return ErrCompressedSizeTooBig
}
- default:
+ case blockTypeRaw:
b.RLESize = 0
+ // We do not need a destination for raw blocks.
+ maxSize = -1
+ default:
+ panic("Invalid block type")
}
// Read block data.
diff --git a/vendor/github.com/klauspost/compress/zstd/decoder.go b/vendor/github.com/klauspost/compress/zstd/decoder.go
index 234025505..324347623 100644
--- a/vendor/github.com/klauspost/compress/zstd/decoder.go
+++ b/vendor/github.com/klauspost/compress/zstd/decoder.go
@@ -461,6 +461,7 @@ func (d *Decoder) startStreamDecoder(inStream chan decodeStream) {
br := readerWrapper{r: stream.r}
decodeStream:
for {
+ frame.history.reset()
err := frame.reset(&br)
if debug && err != nil {
println("Frame decoder returned", err)
diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec.go b/vendor/github.com/klauspost/compress/zstd/seqdec.go
index 15a45f7b5..39238e16a 100644
--- a/vendor/github.com/klauspost/compress/zstd/seqdec.go
+++ b/vendor/github.com/klauspost/compress/zstd/seqdec.go
@@ -64,6 +64,7 @@ type sequenceDecs struct {
hist []byte
literals []byte
out []byte
+ windowSize int
maxBits uint8
}
@@ -82,6 +83,7 @@ func (s *sequenceDecs) initialize(br *bitReader, hist *history, literals, out []
s.hist = hist.b
s.prevOffset = hist.recentOffsets
s.maxBits = s.litLengths.fse.maxBits + s.offsets.fse.maxBits + s.matchLengths.fse.maxBits
+ s.windowSize = hist.windowSize
s.out = out
return nil
}
@@ -131,6 +133,9 @@ func (s *sequenceDecs) decode(seqs int, br *bitReader, hist []byte) error {
if matchOff > len(s.out)+len(hist)+litLen {
return fmt.Errorf("match offset (%d) bigger than current history (%d)", matchOff, len(s.out)+len(hist)+litLen)
}
+ if matchOff > s.windowSize {
+ return fmt.Errorf("match offset (%d) bigger than window size (%d)", matchOff, s.windowSize)
+ }
if matchOff == 0 && matchLen > 0 {
return fmt.Errorf("zero matchoff and matchlen > 0")
}