cocos2d/cocos2d-x — pull request #4073 by ledyba (2013-11-03 02:21:16+00:00)
Title: pXmlBuffer is not null terminated

pXmlBuffer is not null-terminated, so you have to pass size parameter to XmlDocument::Parse.