aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/compiler_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-11-18 14:55:20 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-11-18 18:25:20 +0100
commit0767f13fbd87c99aea7893eb64199b76be42cd61 (patch)
tree81c121cc8f35e879bc1457c489e0278e0fcf25ae /pkg/compiler/compiler_test.go
parent09323409cdbe048449a5a6819c076492c166f18a (diff)
pkg/compiler: fix crash on invalid templates
Discovered by go-fuzz/OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27599
Diffstat (limited to 'pkg/compiler/compiler_test.go')
-rw-r--r--pkg/compiler/compiler_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/compiler/compiler_test.go b/pkg/compiler/compiler_test.go
index 9bc93a519..131270939 100644
--- a/pkg/compiler/compiler_test.go
+++ b/pkg/compiler/compiler_test.go
@@ -151,6 +151,14 @@ type p b[L]
type b[L] {
e b[L[L]]
}`,
+ `
+p() b[len]
+type b[b] b
+`,
+ `
+p() b[len[opt]]
+type b[b] b
+`,
} {
Fuzz([]byte(data)[:len(data):len(data)])
}