fix byte buffer overflow caused by wrong size info
Merge pull request #208 from xiliu82/master

fix byte buffer overflow caused by wrong size info