mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-04-03 03:47:37 +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
|
return
|
||||||
}
|
}
|
||||||
if header.OpCode.IsControl() {
|
if header.OpCode.IsControl() {
|
||||||
|
if header.Length > 128 {
|
||||||
|
err = wsutil.ErrFrameTooLarge
|
||||||
|
return
|
||||||
|
}
|
||||||
err = c.controlHandler(header, c.reader)
|
err = c.controlHandler(header, c.reader)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue