Fix issues surfaced by the fuzzer

This commit is contained in:
Vikram Rangnekar
2020-02-02 01:43:09 -05:00
parent 3a4d885987
commit 1a3d74e1ce
12 changed files with 304 additions and 151 deletions

View File

@ -4,7 +4,11 @@ package qcode
// FuzzerEntrypoint for Fuzzbuzz
func Fuzz(data []byte) int {
GetQType(string(data))
qt := GetQType(string(data))
if qt > QTUpsert {
panic("qt > QTUpsert")
}
qcompile, _ := NewCompiler(Config{})
_, err := qcompile.Compile(data, "user")