mirror of
https://github.com/aler9/gortsplib
synced 2025-10-28 09:31:33 +08:00
ensure unmarshaled entities can be marshaled back (#773)
This commit is contained in:
@@ -58,11 +58,14 @@ func FuzzInterleavedFrameUnmarshal(f *testing.F) {
|
||||
for _, ca := range casesInterleavedFrame {
|
||||
f.Add(ca.enc)
|
||||
}
|
||||
f.Fuzz(func(_ *testing.T, b []byte) {
|
||||
f.Fuzz(func(t *testing.T, b []byte) {
|
||||
var f InterleavedFrame
|
||||
err := f.Unmarshal(bufio.NewReader(bytes.NewBuffer(b)))
|
||||
if err == nil {
|
||||
f.Marshal() //nolint:errcheck
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
_, err = f.Marshal()
|
||||
require.NoError(t, err)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user