mirror of
https://github.com/containers/skopeo.git
synced 2025-09-22 18:37:21 +00:00
Update c/image for https://github.com/containers/image/pull/912
This is an unreleased version of c/image, but it is important to to have the test added in in the next commit enforcing as soon as possible. > go get github.com/containers/image/v5@HEAD > make vendor Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
committed by
Valentin Rothberg
parent
42f68c1c76
commit
8f845aac23
10
vendor/github.com/klauspost/compress/zstd/framedec.go
generated
vendored
10
vendor/github.com/klauspost/compress/zstd/framedec.go
generated
vendored
@@ -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 {
|
||||
|
Reference in New Issue
Block a user