summaryrefslogtreecommitdiff
path: root/indra/llcommon/lluriparser.cpp
diff options
context:
space:
mode:
authorMNikolenko ProductEngine <mnikolenko@productengine.com>2015-04-07 20:58:48 +0300
committerMNikolenko ProductEngine <mnikolenko@productengine.com>2015-04-07 20:58:48 +0300
commitdbb304ab2032153bbd2e5bdd589f6ed72d70a0a1 (patch)
treef4fbb128797109f1941524244406a06ecceaf619 /indra/llcommon/lluriparser.cpp
parente03f1521c82545a49b289d624c8b26be3d1fb3d6 (diff)
MAINT-5023 FIXED URIparser crash in LLUrlEntryBase::urlToLabelWithGreyQuery
Diffstat (limited to 'indra/llcommon/lluriparser.cpp')
-rw-r--r--indra/llcommon/lluriparser.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp
index 8c456ee879..8270c630d8 100644
--- a/indra/llcommon/lluriparser.cpp
+++ b/indra/llcommon/lluriparser.cpp
@@ -118,29 +118,27 @@ void LLUriParser::fragment(const std::string& s)
void LLUriParser::textRangeToString(UriTextRangeA& textRange, std::string& str)
{
+ str = "";
+
if(&textRange == NULL)
{
- LL_WARNS() << "textRange is NULL for uri: " << mNormalizedUri << LL_ENDL;
return;
}
if(textRange.first == NULL)
{
- LL_WARNS() << "textRange.first is NULL for uri: " << mNormalizedUri << LL_ENDL;
return;
}
if(textRange.afterLast == NULL)
{
- LL_WARNS() << "textRange.afterLast is NULL for uri: " << mNormalizedUri << LL_ENDL;
return;
}
S32 len = textRange.afterLast - textRange.first;
if (len)
{
- str = textRange.first;
- str = str.substr(0, len);
+ str.assign(textRange.first, len);
}
}