mirror of https://github.com/axmolengine/axmol.git
fixed potential crash in CCSaxParser
The character array which given to CCSAXParser::parse() may not be NULL terminated. Therefore we must also add the size of the data array to the parameter list of the tinyxml2::XMLDocument::parse() call
This commit is contained in:
parent
dccaedd20d
commit
5372363365
|
@ -105,7 +105,7 @@ bool CCSAXParser::init(const char *pszEncoding)
|
||||||
bool CCSAXParser::parse(const char* pXMLData, unsigned int uDataLength)
|
bool CCSAXParser::parse(const char* pXMLData, unsigned int uDataLength)
|
||||||
{
|
{
|
||||||
tinyxml2::XMLDocument tinyDoc;
|
tinyxml2::XMLDocument tinyDoc;
|
||||||
tinyDoc.Parse(pXMLData);
|
tinyDoc.Parse(pXMLData, uDataLength);
|
||||||
XmlSaxHander printer;
|
XmlSaxHander printer;
|
||||||
printer.setCCSAXParserImp(this);
|
printer.setCCSAXParserImp(this);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue