Better buffer size

This commit is contained in:
Roland Shoemaker 2015-07-21 16:04:21 -07:00
parent eefb8a37ac
commit 259969e797

2
msg.go
View File

@ -921,7 +921,7 @@ 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"`:
bytesTmp := make([]byte, 256*4+1)
bytesTmp := make([]byte, 256)
off, err = packOctetString(fv.String(), msg, off, bytesTmp)
if err != nil {
return lenmsg, err