mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 18:17:52 -05:00
check frame size for status new
This commit is contained in:
parent
6c7dcc35ab
commit
7560a99d7b
@ -120,6 +120,9 @@ func (f *FrameMetadata) UnmarshalFromBuffer(b *buf.Buffer) error {
|
|||||||
f.Target.Network = net.Network_Unknown
|
f.Target.Network = net.Network_Unknown
|
||||||
|
|
||||||
if f.SessionStatus == SessionStatusNew {
|
if f.SessionStatus == SessionStatusNew {
|
||||||
|
if b.Len() < 8 {
|
||||||
|
return newError("insufficient buffer: ", b.Len())
|
||||||
|
}
|
||||||
network := TargetNetwork(b.Byte(4))
|
network := TargetNetwork(b.Byte(4))
|
||||||
b.Advance(5)
|
b.Advance(5)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user