mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-04-01 19:07:35 +03:00
Fix websocket crash
This commit is contained in:
parent
d6d94b689f
commit
ae8ce75e41
1 changed files with 4 additions and 0 deletions
|
@ -74,6 +74,10 @@ func (c *WebsocketConn) Read(b []byte) (n int, err error) {
|
|||
return
|
||||
}
|
||||
if header.OpCode.IsControl() {
|
||||
if header.Length > 128 {
|
||||
err = wsutil.ErrFrameTooLarge
|
||||
return
|
||||
}
|
||||
err = c.controlHandler(header, c.reader)
|
||||
if err != nil {
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue