From 5de348e65c8bf02fc73bc1bbd91fbea0713a3c00 Mon Sep 17 00:00:00 2001 From: Anton Medvedev Date: Thu, 16 Nov 2023 22:16:12 +0100 Subject: [PATCH] fuzz: skip too long code --- test/fuzz/fuzz_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/fuzz/fuzz_test.go b/test/fuzz/fuzz_test.go index e69aaec7b..64467a65e 100644 --- a/test/fuzz/fuzz_test.go +++ b/test/fuzz/fuzz_test.go @@ -53,6 +53,10 @@ func FuzzExpr(f *testing.F) { env := NewEnv() f.Fuzz(func(t *testing.T, code string) { + if len(code) > 1000 { + t.Skip("too long code") + } + program, err := expr.Compile(code, expr.Env(env)) if err != nil { t.Skipf("compile error: %s", err)