From 6ea03f47ed90c3656d79f1095e9d85e67c8d5e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Fri, 17 Jun 2022 14:07:16 +0800 Subject: [PATCH] Fix read buffer size --- shadowaead/aead.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowaead/aead.go b/shadowaead/aead.go index 8e07cdc..3ecaab4 100644 --- a/shadowaead/aead.go +++ b/shadowaead/aead.go @@ -34,7 +34,7 @@ func NewReader(upstream io.Reader, cipher cipher.AEAD, maxPacketSize int) *Reade return &Reader{ upstream: upstream, cipher: cipher, - buffer: make([]byte, maxPacketSize+PacketLengthBufferSize+Overhead*2), + buffer: make([]byte, maxPacketSize+Overhead), nonce: make([]byte, cipher.NonceSize()), } }