1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
// SPDX-License-Identifier: MIT
package dtls
import (
"os"
"testing"
)
func FuzzUnmarshalBinary(f *testing.F) {
TestResumeClient, err := os.ReadFile("testdata/seed/TestResumeClient.raw")
if err != nil {
return
}
f.Add(TestResumeClient)
TestResumeServer, err := os.ReadFile("testdata/seed/TestResumeServer.raw")
if err != nil {
return
}
f.Add(TestResumeServer)
f.Fuzz(func(_ *testing.T, data []byte) {
deserialized := &State{}
_ = deserialized.UnmarshalBinary(data)
})
}
|