diff --git a/scan_rr.go b/scan_rr.go index 00098ad7..8d6a1bf2 100644 --- a/scan_rr.go +++ b/scan_rr.go @@ -2016,9 +2016,12 @@ func setUINFO(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { rr.Hdr = h s, e, c1 := endingToTxtSlice(c, "bad UINFO Uinfo", f) if e != nil { - return nil, e, "" + return nil, e, c1 } - rr.Uinfo = s[0] // silently discard anything above + if ln := len(s); ln == 0 { + return rr, nil, c1 + } + rr.Uinfo = s[0] // silently discard anything after the first character-string return rr, nil, c1 } diff --git a/update_test.go b/update_test.go index 8ecd4131..56602dfe 100644 --- a/update_test.go +++ b/update_test.go @@ -10,8 +10,7 @@ func TestDynamicUpdateParsing(t *testing.T) { for _, typ := range TypeToString { if typ == "OPT" || typ == "AXFR" || typ == "IXFR" || typ == "ANY" || typ == "TKEY" || typ == "TSIG" || typ == "ISDN" || typ == "UNSPEC" || typ == "NULL" || typ == "ATMA" || - typ == "Reserved" || typ == "None" || typ == "NXT" || typ == "MAILB" || typ == "MAILA" || - typ == "UINFO" { + typ == "Reserved" || typ == "None" || typ == "NXT" || typ == "MAILB" || typ == "MAILA" { continue } r, err := NewRR(prefix + typ)