mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +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)
|
time.Sleep(time.Millisecond * 500)
|
||||||
continue
|
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)
|
c.Error("parse incoming packet error: invalid packet length %v", l)
|
||||||
errCount++
|
errCount++
|
||||||
if errCount > 2 {
|
if errCount > 2 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user