parser: add basic fuzzing
This commit is contained in:
12
parser/fuzz.go
Normal file
12
parser/fuzz.go
Normal file
@@ -0,0 +1,12 @@
|
||||
// +build gofuzz
|
||||
|
||||
package parser
|
||||
|
||||
func Fuzz(data []byte) int {
|
||||
block := NewBlock()
|
||||
_, err := block.ParseFromSlice(data)
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
return 1
|
||||
}
|
||||
Reference in New Issue
Block a user