fix length check in auth reader

pull/716/head
Darien Raymond 2017-11-18 19:37:36 +01:00
parent 5751490802
commit 5c9f54a453
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 2 additions and 2 deletions

View File

@ -162,7 +162,7 @@ func (r *AuthenticationReader) ReadMultiBuffer() (buf.MultiBuffer, error) {
mb.Write(b)
} else {
var bb *buf.Buffer
if len(b) < buf.Size {
if len(b) <= buf.Size {
bb = buf.New()
} else {
bb = buf.NewLocal(len(b))
@ -180,7 +180,7 @@ func (r *AuthenticationReader) ReadMultiBuffer() (buf.MultiBuffer, error) {
mb.Write(b)
} else {
var bb *buf.Buffer
if len(b) < buf.Size {
if len(b) <= buf.Size {
bb = buf.New()
} else {
bb = buf.NewLocal(len(b))