From 4f00ec880eef6229a3602b2086bbb1dbbc38d08f Mon Sep 17 00:00:00 2001 From: "J. Yi" <93548144+jyyi1@users.noreply.github.com> Date: Fri, 17 Nov 2023 13:49:59 -0500 Subject: [PATCH] Update transport/tlsfrag/buffer.go Co-authored-by: Vinicius Fortuna --- transport/tlsfrag/buffer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/tlsfrag/buffer.go b/transport/tlsfrag/buffer.go index 35113592..3f198d1a 100644 --- a/transport/tlsfrag/buffer.go +++ b/transport/tlsfrag/buffer.go @@ -45,7 +45,7 @@ var _ io.ReaderFrom = (*clientHelloBuffer)(nil) func newClientHelloBuffer() *clientHelloBuffer { // Allocate the 5 bytes header first, and then reallocate it to contain the entire packet later return &clientHelloBuffer{ - data: make([]byte, recordHeaderLen), + data: make([]byte, 0, recordHeaderLen), valid: true, toRead: recordHeaderLen, }