check frame size for status new

pull/1435/head
Darien Raymond 6 years ago
parent 6c7dcc35ab
commit 7560a99d7b
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

@ -120,6 +120,9 @@ func (f *FrameMetadata) UnmarshalFromBuffer(b *buf.Buffer) error {
f.Target.Network = net.Network_Unknown
if f.SessionStatus == SessionStatusNew {
if b.Len() < 8 {
return newError("insufficient buffer: ", b.Len())
}
network := TargetNetwork(b.Byte(4))
b.Advance(5)

Loading…
Cancel
Save