diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-03-22 12:10:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-22 12:10:27 +0100 |
commit | b726d75f20822b4a23a679acd94696b924a6a374 (patch) | |
tree | 218a39354834d34a53fdeaa6b5be472c70a5bd23 /vendor/github.com/klauspost/compress/zstd/framedec.go | |
parent | e034db16bf68c06c1ecf63addd033fcbd83090e3 (diff) | |
parent | 63bf3991ef14959983ecd86c406bd941c908157b (diff) | |
download | podman-b726d75f20822b4a23a679acd94696b924a6a374.tar.gz podman-b726d75f20822b4a23a679acd94696b924a6a374.tar.bz2 podman-b726d75f20822b4a23a679acd94696b924a6a374.zip |
Merge pull request #13536 from dcermak/storage-autodetect-mount_program
Storage autodetect mount program
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd/framedec.go')
-rw-r--r-- | vendor/github.com/klauspost/compress/zstd/framedec.go | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/framedec.go b/vendor/github.com/klauspost/compress/zstd/framedec.go index 29c3176b0..11089d223 100644 --- a/vendor/github.com/klauspost/compress/zstd/framedec.go +++ b/vendor/github.com/klauspost/compress/zstd/framedec.go @@ -197,7 +197,7 @@ func (d *frameDec) reset(br byteBuffer) error { default: fcsSize = 1 << v } - d.FrameContentSize = 0 + d.FrameContentSize = fcsUnknown if fcsSize > 0 { b, err := br.readSmall(fcsSize) if err != nil { @@ -343,12 +343,7 @@ func (d *frameDec) runDecoder(dst []byte, dec *blockDec) ([]byte, error) { err = ErrDecoderSizeExceeded break } - if d.SingleSegment && uint64(len(d.history.b)) > d.o.maxDecodedSize { - println("runDecoder: single segment and", uint64(len(d.history.b)), ">", d.o.maxDecodedSize) - err = ErrFrameSizeExceeded - break - } - if d.FrameContentSize > 0 && uint64(len(d.history.b)-crcStart) > d.FrameContentSize { + if uint64(len(d.history.b)-crcStart) > d.FrameContentSize { println("runDecoder: FrameContentSize exceeded", uint64(len(d.history.b)-crcStart), ">", d.FrameContentSize) err = ErrFrameSizeExceeded break @@ -356,13 +351,13 @@ func (d *frameDec) runDecoder(dst []byte, dec *blockDec) ([]byte, error) { if dec.Last { break } - if debugDecoder && d.FrameContentSize > 0 { + if debugDecoder { println("runDecoder: FrameContentSize", uint64(len(d.history.b)-crcStart), "<=", d.FrameContentSize) } } dst = d.history.b if err == nil { - if d.FrameContentSize > 0 && uint64(len(d.history.b)-crcStart) != d.FrameContentSize { + if d.FrameContentSize != fcsUnknown && uint64(len(d.history.b)-crcStart) != d.FrameContentSize { err = ErrFrameSizeMismatch } else if d.HasCheckSum { var n int |