mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-07-05 13:53:26 +00:00
fix: minimum packet length check.
This commit is contained in:
@ -191,7 +191,7 @@ func (c *QQClient) netLoop() {
|
||||
time.Sleep(time.Millisecond * 500)
|
||||
continue
|
||||
}
|
||||
if l <= 0 || l > 1024*1024*10 { // max 10MB
|
||||
if l < 4 || l > 1024*1024*10 { // max 10MB
|
||||
c.Error("parse incoming packet error: invalid packet length %v", l)
|
||||
errCount++
|
||||
if errCount > 2 {
|
||||
|
Reference in New Issue
Block a user