mirror of
https://github.com/anchore/syft.git
synced 2026-05-20 04:05:24 +02:00
chore(deps): update Go version (#4798)
Signed-off-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com> Co-authored-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
This commit is contained in:
parent
89e4e609d5
commit
33bc4b8397
@ -499,10 +499,7 @@ func decompressLZMA(compressedData []byte, uncompressedSize uint32) ([]byte, err
|
|||||||
// it may be that the dictionary size was not considered properly in this code.
|
// it may be that the dictionary size was not considered properly in this code.
|
||||||
const minDictSize = 64 * 1024 // 64KB minimum
|
const minDictSize = 64 * 1024 // 64KB minimum
|
||||||
const maxDictSize = 128 * 1024 * 1024 // 128MB maximum
|
const maxDictSize = 128 * 1024 * 1024 // 128MB maximum
|
||||||
dictSize := max(nextPowerOf2(uncompressedSize), minDictSize)
|
dictSize := min(max(nextPowerOf2(uncompressedSize), minDictSize), maxDictSize)
|
||||||
if dictSize > maxDictSize {
|
|
||||||
dictSize = maxDictSize
|
|
||||||
}
|
|
||||||
|
|
||||||
// construct standard 13-byte LZMA header
|
// construct standard 13-byte LZMA header
|
||||||
header := make([]byte, 13)
|
header := make([]byte, 13)
|
||||||
|
|||||||
@ -548,7 +548,7 @@ snapshots:
|
|||||||
`)
|
`)
|
||||||
|
|
||||||
// run multiple times to catch nondeterminism
|
// run multiple times to catch nondeterminism
|
||||||
for i := 0; i < 10; i++ {
|
for range 10 {
|
||||||
parser := &pnpmV9LockYaml{}
|
parser := &pnpmV9LockYaml{}
|
||||||
pkgs, err := parser.Parse(9.0, lockfileV9)
|
pkgs, err := parser.Parse(9.0, lockfileV9)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
@ -570,7 +570,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-AAA}
|
resolution: {integrity: sha512-AAA}
|
||||||
`)
|
`)
|
||||||
|
|
||||||
for i := 0; i < 10; i++ {
|
for range 10 {
|
||||||
parser := &pnpmV6LockYaml{}
|
parser := &pnpmV6LockYaml{}
|
||||||
pkgs, err := parser.Parse(6.0, lockfileV6)
|
pkgs, err := parser.Parse(6.0, lockfileV6)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|||||||
@ -112,7 +112,7 @@ func Less(i, j Package) bool {
|
|||||||
jLocations := j.Locations.ToSlice()
|
jLocations := j.Locations.ToSlice()
|
||||||
if i.Type == j.Type {
|
if i.Type == j.Type {
|
||||||
maxLen := max(len(jLocations), len(iLocations))
|
maxLen := max(len(jLocations), len(iLocations))
|
||||||
for l := 0; l < maxLen; l++ {
|
for l := range maxLen {
|
||||||
if len(iLocations) < l+1 || len(jLocations) < l+1 {
|
if len(iLocations) < l+1 || len(jLocations) < l+1 {
|
||||||
if len(iLocations) == len(jLocations) {
|
if len(iLocations) == len(jLocations) {
|
||||||
break
|
break
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user