1. Modify length calculation of array msg 2.Fix error check bug

No match.