diff --git a/msg.go b/msg.go index e26ce9c9..dc989557 100644 --- a/msg.go +++ b/msg.go @@ -921,8 +921,8 @@ func packStructValue(val reflect.Value, msg []byte, off int, compression map[str copy(msg[off:off+len(s)], s) off += len(s) case `dns:"octet"`: - var varstrTmp []byte - off, err = packOctetString(fv.String(), msg, off, varstrTmp) + bytesTmp := make([]byte, 0) + off, err = packOctetString(fv.String(), msg, off, bytesTmp) if err != nil { return lenmsg, err } diff --git a/zscan_rr.go b/zscan_rr.go index 34efa6c0..3763d3f4 100644 --- a/zscan_rr.go +++ b/zscan_rr.go @@ -2197,8 +2197,6 @@ func setCAA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { } if len(s) > 1 { return nil, &ParseError{f, "bad CAA Value", l}, "" - } else if len(s) == 0 { - rr.Value = "" } else { rr.Value = s[0] }