blob: 5d22532a767981c0ebc548f6ad612878ace71a1b [file] [log] [blame]
manikkaraj k9eb6cac2019-05-09 12:32:03 -04001// +build gofuzz
2
3package ethernet
4
5func Fuzz(data []byte) int {
6 f := new(Frame)
7 if err := f.UnmarshalBinary(data); err != nil {
8 return 0
9 }
10
11 if _, err := f.MarshalBinary(); err != nil {
12 panic(err)
13 }
14
15 if err := f.UnmarshalFCS(data); err != nil {
16 return 0
17 }
18
19 if _, err := f.MarshalFCS(); err != nil {
20 panic(err)
21 }
22
23 return 1
24}