1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-17 23:06:30 -05:00
This commit is contained in:
Darien Raymond 2018-12-17 20:31:54 +01:00
parent ac6c262f2e
commit 012a2d6f57
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -26,6 +26,9 @@ type KCPPacketReader struct {
func (r *KCPPacketReader) Read(b []byte) []Segment { func (r *KCPPacketReader) Read(b []byte) []Segment {
if r.Header != nil { if r.Header != nil {
if int32(len(b)) <= r.Header.Size() {
return nil
}
b = b[r.Header.Size():] b = b[r.Header.Size():]
} }
if r.Security != nil { if r.Security != nil {