mirror of
https://github.com/containers/skopeo.git
synced 2025-09-07 01:30:16 +00:00
Update to c/image v4.0.1
Update to use the correct c/image/v4 import path, work originally from https://github.com/containers/skopeo/pull/733 by Valentin Rothberg <rothberg@redhat.com>. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
committed by
Miloslav Trmač
parent
881edbf122
commit
7922028d7c
8
vendor/github.com/klauspost/compress/fse/decompress.go
generated
vendored
8
vendor/github.com/klauspost/compress/fse/decompress.go
generated
vendored
@@ -243,7 +243,7 @@ func (s *Scratch) buildDtable() error {
|
||||
nBits := s.actualTableLog - byte(highBits(uint32(nextState)))
|
||||
s.decTable[u].nbBits = nBits
|
||||
newState := (nextState << nBits) - tableSize
|
||||
if newState > tableSize {
|
||||
if newState >= tableSize {
|
||||
return fmt.Errorf("newState (%d) outside table size (%d)", newState, tableSize)
|
||||
}
|
||||
if newState == uint16(u) && nBits == 0 {
|
||||
@@ -281,8 +281,12 @@ func (s *Scratch) decompress() error {
|
||||
tmp[off+2] = s1.nextFast()
|
||||
tmp[off+3] = s2.nextFast()
|
||||
off += 4
|
||||
// When off is 0, we have overflowed and should write.
|
||||
if off == 0 {
|
||||
s.Out = append(s.Out, tmp...)
|
||||
if len(s.Out) >= s.DecompressLimit {
|
||||
return fmt.Errorf("output size (%d) > DecompressLimit (%d)", len(s.Out), s.DecompressLimit)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -296,7 +300,7 @@ func (s *Scratch) decompress() error {
|
||||
off += 4
|
||||
if off == 0 {
|
||||
s.Out = append(s.Out, tmp...)
|
||||
off = 0
|
||||
// When off is 0, we have overflowed and should write.
|
||||
if len(s.Out) >= s.DecompressLimit {
|
||||
return fmt.Errorf("output size (%d) > DecompressLimit (%d)", len(s.Out), s.DecompressLimit)
|
||||
}
|
||||
|
Reference in New Issue
Block a user