Viewer#863 Crash reading xml

master
Andrey Kleshchev 2024-02-22 01:09:23 +02:00 committed by Andrey Kleshchev
parent 6ae83f06d8
commit da0f5ea0b4
1 changed files with 11 additions and 4 deletions

View File

@ -404,11 +404,18 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data)
if (buffer)
{
((char*) buffer)[count ? count - 1 : 0] = '\0';
if (mEmitErrors)
{
LL_INFOS() << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*)buffer << LL_ENDL;
}
}
if (mEmitErrors)
{
LL_INFOS() << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << LL_ENDL;
}
else
{
if (mEmitErrors)
{
LL_INFOS() << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR, null buffer" << LL_ENDL;
}
}
data = LLSD();
return LLSDParser::PARSE_FAILURE;
}