mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
fix: minimum packet length check.
This commit is contained in:
parent
d2c218e92b
commit
2309d511bb
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user