From cf080e806106159c8cd96a4fe23b198f0b8b1e81 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Wed, 8 Nov 2017 22:41:46 +0100 Subject: [PATCH] ensure buffer is completely filled in --- common/crypto/chunk.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/crypto/chunk.go b/common/crypto/chunk.go index 0fc89db8..f284ef19 100644 --- a/common/crypto/chunk.go +++ b/common/crypto/chunk.go @@ -73,7 +73,7 @@ func (r *ChunkStreamReader) readSize() (uint16, error) { return 0, err } } - common.Must2(r.leftOver.Read(r.buffer)) + common.Must2(io.ReadFull(&r.leftOver, r.buffer)) return r.sizeDecoder.Decode(r.buffer) }