Browse Source

check frame size for status new

pull/1435/head
Darien Raymond 6 years ago
parent
commit
7560a99d7b
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
  1. 3
      common/mux/frame.go

3
common/mux/frame.go

@ -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