summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsdserialize_xml.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-02-22 01:09:23 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-02-22 01:36:10 +0200
commitda0f5ea0b4366ccc2b065103a7bc37552b1fe8de (patch)
tree9d95e16bc9c02a585b329877772952332b28501a /indra/llcommon/llsdserialize_xml.cpp
parent6ae83f06d8a91d2fbfc83f64e476640d0d5bac6c (diff)
Viewer#863 Crash reading xml
Diffstat (limited to 'indra/llcommon/llsdserialize_xml.cpp')
-rw-r--r--indra/llcommon/llsdserialize_xml.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp
index 1511983596..db61f4ae41 100644
--- a/indra/llcommon/llsdserialize_xml.cpp
+++ b/indra/llcommon/llsdserialize_xml.cpp
@@ -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;
}