From 259969e797348d20e8c144a7573c23f06fa962f5 Mon Sep 17 00:00:00 2001 From: Roland Shoemaker Date: Tue, 21 Jul 2015 16:04:21 -0700 Subject: [PATCH] Better buffer size --- msg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msg.go b/msg.go index 31d0fa33..34896a75 100644 --- a/msg.go +++ b/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) 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