Check the length of data, if less 12, read more

This commit is contained in:
mikespook 2012-12-27 12:13:43 +08:00
parent cd1bd72a80
commit 63480d6547

View File

@ -137,6 +137,9 @@ BEGIN:
}
// split package
tl := len(data)
if tl < 12 {
goto BEGIN
}
start := 0
for i := 0; i < tl; i++ {
if string(data[start:start+4]) == common.RES_STR {