From b6662eed3f27ac5466501b046db4f1608845af61 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 16 Jun 2021 05:57:09 -0400 Subject: Vendor in containers/common v0.40.0 Signed-off-by: Daniel J Walsh --- vendor/github.com/klauspost/compress/zstd/blockdec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vendor/github.com/klauspost/compress/zstd/blockdec.go') diff --git a/vendor/github.com/klauspost/compress/zstd/blockdec.go b/vendor/github.com/klauspost/compress/zstd/blockdec.go index e30af505c..8a98c4562 100644 --- a/vendor/github.com/klauspost/compress/zstd/blockdec.go +++ b/vendor/github.com/klauspost/compress/zstd/blockdec.go @@ -168,10 +168,10 @@ func (b *blockDec) reset(br byteBuffer, windowSize uint64) error { // Read block data. if cap(b.dataStorage) < cSize { - if b.lowMem { + if b.lowMem || cSize > maxCompressedBlockSize { b.dataStorage = make([]byte, 0, cSize) } else { - b.dataStorage = make([]byte, 0, maxBlockSize) + b.dataStorage = make([]byte, 0, maxCompressedBlockSize) } } if cap(b.dst) <= maxSize { -- cgit v1.2.3-54-g00ecf