mirror of
https://github.com/soypat/lneto.git
synced 2026-08-30 11:29:06 +00:00
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:
+2
-1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user