Skip to content

Commit da0f5ea

Browse files
committed
Viewer#863 Crash reading xml
1 parent 6ae83f0 commit da0f5ea

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

indra/llcommon/llsdserialize_xml.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,18 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data)
404404
if (buffer)
405405
{
406406
((char*) buffer)[count ? count - 1 : 0] = '\0';
407+
if (mEmitErrors)
408+
{
409+
LL_INFOS() << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*)buffer << LL_ENDL;
410+
}
407411
}
408-
if (mEmitErrors)
409-
{
410-
LL_INFOS() << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << LL_ENDL;
411-
}
412+
else
413+
{
414+
if (mEmitErrors)
415+
{
416+
LL_INFOS() << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR, null buffer" << LL_ENDL;
417+
}
418+
}
412419
data = LLSD();
413420
return LLSDParser::PARSE_FAILURE;
414421
}

0 commit comments

Comments
 (0)