From 5406418371b4ba2eac81003794cd3c3e66dc3a78 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Mon, 16 Jan 2017 13:28:52 +0000 Subject: [PATCH] crypto/tls: fix panic in PSK binders parsing BoGo: Resume-Server-ExtraPSKBinder --- handshake_messages.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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])