From 5af3580bcf673c42027d5008e72c257b62aaefb5 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Mon, 2 Apr 2018 00:00:15 +0200 Subject: [PATCH] correct magic number --- common/crypto/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/crypto/auth.go b/common/crypto/auth.go index 20258f59..e7b3e559 100644 --- a/common/crypto/auth.go +++ b/common/crypto/auth.go @@ -124,7 +124,7 @@ func (r *AuthenticationReader) readSize() (int32, error) { var errSoft = newError("waiting for more data") func (r *AuthenticationReader) readInternal(soft bool) (*buf.Buffer, error) { - if soft && r.reader.BufferedBytes() < 2 { + if soft && r.reader.BufferedBytes() < int32(r.sizeParser.SizeBytes()) { return nil, errSoft }