Add fuzz tests, rename fuzz tests and fix panic found by fuzzing (#72)

* begin adding better fuzz test

* finish adding working fuzzer

* implement mutateipv4

* fuzzer finds a panic in ICMP client on receive empty payload

* rename fuzz tests to reflect fuzz methodology
This commit is contained in:
Pat Whittingslow
2026-04-11 11:09:51 -03:00
committed by GitHub
parent 68461b4416
commit 66a1aec593
226 changed files with 835 additions and 20 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ package udp
import (
"encoding/binary"
"net/netip"
"testing"
"github.com/soypat/lneto/internal"
@@ -29,7 +30,7 @@ func newTestConn(t *testing.T) *Conn {
if err != nil {
t.Fatal(err)
}
err = conn.Open(1234, 8080, []byte{10, 0, 0, 1})
err = conn.Open(1234, netip.AddrPortFrom(netip.AddrFrom4([4]byte{10, 0, 0, 1}), 8080))
if err != nil {
t.Fatal(err)
}