improve fuzz tests (#571)

This commit is contained in:
Alessandro Ros
2024-05-17 19:19:15 +02:00
committed by GitHub
parent f283abc2e7
commit ef60c8c755
20 changed files with 250 additions and 234 deletions

View File

@@ -156,12 +156,9 @@ func TestResponseString(t *testing.T) {
}
func FuzzResponseUnmarshal(f *testing.F) {
f.Add([]byte("RTSP/1.0 "))
f.Add([]byte("RTSP/1.0 200 OK\r\n" +
"Content-Length: 100\r\n" +
"\r\n" +
"testing"))
for _, ca := range casesResponse {
f.Add(ca.byts)
}
f.Fuzz(func(_ *testing.T, b []byte) {
var res Response