mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-08 09:32:06 +08:00
Fix websocket crash
This commit is contained in:
parent
d6d94b689f
commit
ae8ce75e41
@ -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…
x
Reference in New Issue
Block a user