Commit 84649876 authored by Mikio Hara's avatar Mikio Hara

websocket: add extented payload length check for the case of 7+64 bits

Fixes golang/go#11999.

Change-Id: I7ee0966d2e8f79973814f48afc7e8f2cd4af1e50
Reviewed-on: https://go-review.googlesource.com/13059Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
parent 6ba52e3e
......@@ -157,6 +157,9 @@ func (buf hybiFrameReaderFactory) NewFrameReader() (frame frameReader, err error
if err != nil {
return
}
if lengthFields == 8 && i == 0 { // MSB must be zero when 7+64 bits
b &= 0x7f
}
header = append(header, b)
hybiFrame.header.Length = hybiFrame.header.Length*256 + int64(b)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment