diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index f00c06aea8..96b1c8681f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -147,7 +147,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.20.x + go-version: 1.21.x - name: Checkout code uses: actions/checkout@v2 @@ -201,3 +201,8 @@ jobs: - name: zip/FuzzReader run: go test -run=none -fuzz=FuzzReader -fuzztime=500000x -test.fuzzminimizetime=10ms ./zip/. + - name: fse/FuzzCompress + run: go test -run=none -fuzz=FuzzCompress -fuzztime=1000000x -test.fuzzminimizetime=10ms ./fse/. + + - name: fse/FuzzDecompress + run: go test -run=none -fuzz=FuzzDecompress -fuzztime=1000000x -test.fuzzminimizetime=10ms ./fse/. \ No newline at end of file diff --git a/fse/fuzz_test.go b/fse/fuzz_test.go index 64b670ee9a..6221d7e55b 100644 --- a/fse/fuzz_test.go +++ b/fse/fuzz_test.go @@ -32,9 +32,11 @@ func FuzzCompress(f *testing.F) { } func FuzzDecompress(f *testing.F) { - fuzz.AddFromZip(f, "testdata/fse_decompress.zip", fuzz.TypeRaw, false) + // Input is mixed, but TypeGoFuzz will fall back to raw input. + fuzz.AddFromZip(f, "testdata/fse_decompress.zip", fuzz.TypeGoFuzz, false) f.Fuzz(func(t *testing.T, buf0 []byte) { var s2 Scratch + s2.DecompressLimit = 128 << 10 //Decompress got, err := Decompress(buf0, &s2) if err != nil || len(got) == 0 { diff --git a/fse/testdata/fse_decompress.zip b/fse/testdata/fse_decompress.zip index 7d59ed2e1c..1c97a7816a 100644 Binary files a/fse/testdata/fse_decompress.zip and b/fse/testdata/fse_decompress.zip differ