1
0
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:
Mrs4s 2021-10-14 21:46:20 +08:00
parent d2c218e92b
commit 2309d511bb
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7

View File

@ -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 {