pXmlBuffer is not null terminated(to master  branch)

Supposed to send PR to master branch at https://github.com/cocos2d/cocos2d-x/pull/4073