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()), } }