ensure unmarshaled entities can be marshaled back (#773)

This commit is contained in:
Alessandro Ros
2025-05-04 11:27:28 +02:00
committed by GitHub
parent 3e555e2d18
commit 7f5aac27d1
22 changed files with 89 additions and 50 deletions

View File

@@ -139,8 +139,10 @@ func FuzzHeaderUnmarshal(f *testing.F) {
f.Fuzz(func(_ *testing.T, b []byte) {
var h Header
err := h.unmarshal(bufio.NewReader(bytes.NewBuffer(b)))
if err == nil {
h.marshal()
if err != nil {
return
}
h.marshal()
})
}