mirror of
https://github.com/miekg/dns.git
synced 2025-10-18 13:21:15 +02:00
Better buffer size
This commit is contained in:
parent
eefb8a37ac
commit
259969e797
2
msg.go
2
msg.go
@ -921,7 +921,7 @@ func packStructValue(val reflect.Value, msg []byte, off int, compression map[str
|
|||||||
copy(msg[off:off+len(s)], s)
|
copy(msg[off:off+len(s)], s)
|
||||||
off += len(s)
|
off += len(s)
|
||||||
case `dns:"octet"`:
|
case `dns:"octet"`:
|
||||||
bytesTmp := make([]byte, 256*4+1)
|
bytesTmp := make([]byte, 256)
|
||||||
off, err = packOctetString(fv.String(), msg, off, bytesTmp)
|
off, err = packOctetString(fv.String(), msg, off, bytesTmp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return lenmsg, err
|
return lenmsg, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user