Skip to content

Commit 901f968

Browse files
author
Mateusz
committed
test: bound selector fuzz inputs
1 parent fca885d commit 901f968

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

internal/core/routing/fuzz_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ func FuzzParseSelector(f *testing.F) {
1818
f.Add("[weight=2]x:y^[first]p:q")
1919
f.Add("m?max_tokens=10")
2020
f.Fuzz(func(t *testing.T, s string) {
21+
if len(s) > 4<<10 {
22+
return
23+
}
2124
for _, r := range s {
2225
if !unicode.IsPrint(r) && r != ' ' {
23-
t.Skip()
26+
return
2427
}
2528
}
2629
sel, err := Parse(s)

0 commit comments

Comments
 (0)