mirror of
https://github.com/jwetzell/artnet-go.git
synced 2026-08-16 12:33:23 +00:00
mess around with fuzzing
This commit is contained in:
@@ -113,3 +113,11 @@ func BenchmarkArtDmxMarshalBinary(b *testing.B) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func FuzzArtDmxUnmarshalBinary(f *testing.F) {
|
||||
f.Add([]byte{65, 114, 116, 45, 78, 101, 116, 0, 0, 80, 0, 14, 237, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
|
||||
f.Fuzz(func(t *testing.T, data []byte) {
|
||||
artDmx := artnet.ArtDmx{}
|
||||
artDmx.UnmarshalBinary(data)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
go test fuzz v1
|
||||
[]byte("Art-Net\x00000000")
|
||||
@@ -121,3 +121,11 @@ func BenchmarkArtTimeCodeMarshalBinary(b *testing.B) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func FuzzArtTimeCodeUnmarshalBinary(f *testing.F) {
|
||||
f.Add([]byte{65, 114, 116, 45, 78, 101, 116, 0, 0, 151, 0, 14, 0, 0, 11, 17, 3, 0, 0})
|
||||
f.Fuzz(func(t *testing.T, data []byte) {
|
||||
artTimeCode := artnet.ArtTimeCode{}
|
||||
artTimeCode.UnmarshalBinary(data)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user