mirror of https://github.com/v2ray/v2ray-core
fix length check in auth reader
parent
5751490802
commit
5c9f54a453
|
@ -162,7 +162,7 @@ func (r *AuthenticationReader) ReadMultiBuffer() (buf.MultiBuffer, error) {
|
||||||
mb.Write(b)
|
mb.Write(b)
|
||||||
} else {
|
} else {
|
||||||
var bb *buf.Buffer
|
var bb *buf.Buffer
|
||||||
if len(b) < buf.Size {
|
if len(b) <= buf.Size {
|
||||||
bb = buf.New()
|
bb = buf.New()
|
||||||
} else {
|
} else {
|
||||||
bb = buf.NewLocal(len(b))
|
bb = buf.NewLocal(len(b))
|
||||||
|
@ -180,7 +180,7 @@ func (r *AuthenticationReader) ReadMultiBuffer() (buf.MultiBuffer, error) {
|
||||||
mb.Write(b)
|
mb.Write(b)
|
||||||
} else {
|
} else {
|
||||||
var bb *buf.Buffer
|
var bb *buf.Buffer
|
||||||
if len(b) < buf.Size {
|
if len(b) <= buf.Size {
|
||||||
bb = buf.New()
|
bb = buf.New()
|
||||||
} else {
|
} else {
|
||||||
bb = buf.NewLocal(len(b))
|
bb = buf.NewLocal(len(b))
|
||||||
|
|
Loading…
Reference in New Issue