We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a14903 commit a50d26cCopy full SHA for a50d26c
pkg/protocol/handshake/message_hello_verify_request.go
@@ -51,8 +51,8 @@ func (m *MessageHelloVerifyRequest) Unmarshal(data []byte) error {
51
}
52
m.Version.Major = data[0]
53
m.Version.Minor = data[1]
54
- cookieLength := data[2]
55
- if len(data) < (int(cookieLength) + 3) {
+ cookieLength := int(data[2])
+ if len(data) < cookieLength+3 {
56
return errBufferTooSmall
57
58
m.Cookie = make([]byte, cookieLength)
0 commit comments