mirror of
https://github.com/gortc/stun.git
synced 2025-09-26 20:41:36 +08:00
fuzz: enable for setters and fix found crashers
This commit is contained in:
24
fuzz_test.go
24
fuzz_test.go
@@ -3,10 +3,10 @@
|
||||
package stun
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMessageType_FuzzerCrash1(t *testing.T) {
|
||||
@@ -71,3 +71,25 @@ func TestFuzzType_Crashers(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAttrPick(t *testing.T) {
|
||||
attributes := attrs{
|
||||
{new(XORMappedAddress), AttrXORMappedAddress},
|
||||
}
|
||||
for i := byte(0); i < 255; i++ {
|
||||
attributes.pick(i)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFuzzSetters_Crashers(t *testing.T) {
|
||||
for _, buf := range corpus(t, "stun-setters", "crashers") {
|
||||
FuzzSetters(buf)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFuzzSetters_Coverage(t *testing.T) {
|
||||
for _, buf := range corpus(t, "stun-setters", "corpus") {
|
||||
FuzzSetters(buf)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user