1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-02 15:36:41 -05:00

don't read 0 bytes

This commit is contained in:
Darien Raymond 2018-02-09 17:56:39 +01:00
parent 8460d016ab
commit 30a0aa6fb0
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -213,7 +213,7 @@ func (s *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.Request
}
if invalidRequest {
randomLen := dice.Roll(32)
randomLen := dice.Roll(32) + 1
// Read random number of bytes for prevent detection.
buffer.AppendSupplier(buf.ReadFullFrom(decryptor, randomLen))
return nil, newError("invalid request")