1package dmarc
2
3import (
4 "testing"
5)
6
7func FuzzParseRecord(f *testing.F) {
8 f.Add("")
9 f.Add("V = DMARC1; P = reject ;\tSP=none; unknown \t=\t ignored-future-value \t ; adkim=s; aspf=s; rua=mailto:dmarc-feedback@example.com ,\t\tmailto:tld-test@thirdparty.example.net!10m; RUF=mailto:auth-reports@example.com ,\t\tmailto:tld-test@thirdparty.example.net!0G; RI = 123; FO = 0:1:d:s ; RF= afrf : other; Pct = 0")
10 f.Add("v=DMARC1; rua=mailto:dmarc-feedback@example.com!99999999999999999999999999999999999999999999999")
11 f.Fuzz(func(t *testing.T, s string) {
12 r, _, err := ParseRecord(s)
13 if err == nil {
14 _ = r.String()
15 }
16 })
17}
18