diff --git a/handshake_messages.go b/handshake_messages.go index d1a2b2f..0081499 100644 --- a/handshake_messages.go +++ b/handshake_messages.go @@ -651,7 +651,7 @@ func (m *clientHelloMsg) unmarshal(data []byte) bool { } i := 0 for len(d) > 0 { - if len(d) < 1 { + if len(d) < 1 || i >= len(m.psks) { return false } l := int(d[0])