summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/zstd/framedec.go
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2020-05-05 08:57:55 +0000
committerDaniel J Walsh <dwalsh@redhat.com>2020-05-05 13:35:24 -0400
commit86f7dbc4cb8bf8f9abbd6a4721bc748d000d2eb4 (patch)
tree695c9846a390d90e174df058c0452b1c69254734 /vendor/github.com/klauspost/compress/zstd/framedec.go
parente1be837a4ff149e00ff6af9e71cf9ea625e33e6f (diff)
downloadpodman-86f7dbc4cb8bf8f9abbd6a4721bc748d000d2eb4.tar.gz
podman-86f7dbc4cb8bf8f9abbd6a4721bc748d000d2eb4.tar.bz2
podman-86f7dbc4cb8bf8f9abbd6a4721bc748d000d2eb4.zip
Bump github.com/containers/storage from 1.19.0 to 1.19.1
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.19.0 to 1.19.1. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.19.0...v1.19.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd/framedec.go')
-rw-r--r--vendor/github.com/klauspost/compress/zstd/framedec.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/framedec.go b/vendor/github.com/klauspost/compress/zstd/framedec.go
index e38f34a9b..780880ebe 100644
--- a/vendor/github.com/klauspost/compress/zstd/framedec.go
+++ b/vendor/github.com/klauspost/compress/zstd/framedec.go
@@ -233,7 +233,11 @@ func (d *frameDec) reset(br byteBuffer) error {
return ErrWindowSizeTooSmall
}
d.history.windowSize = int(d.WindowSize)
- d.history.maxSize = d.history.windowSize + maxBlockSize
+ if d.o.lowMem && d.history.windowSize < maxBlockSize {
+ d.history.maxSize = d.history.windowSize * 2
+ } else {
+ d.history.maxSize = d.history.windowSize + maxBlockSize
+ }
// history contains input - maybe we do something
d.rawInput = br
return nil
@@ -320,8 +324,8 @@ func (d *frameDec) checkCRC() error {
func (d *frameDec) initAsync() {
if !d.o.lowMem && !d.SingleSegment {
- // set max extra size history to 20MB.
- d.history.maxSize = d.history.windowSize + maxBlockSize*10
+ // set max extra size history to 10MB.
+ d.history.maxSize = d.history.windowSize + maxBlockSize*5
}
// re-alloc if more than one extra block size.
if d.o.lowMem && cap(d.history.b) > d.history.maxSize+maxBlockSize {