From dbb304ab2032153bbd2e5bdd589f6ed72d70a0a1 Mon Sep 17 00:00:00 2001 From: MNikolenko ProductEngine Date: Tue, 7 Apr 2015 20:58:48 +0300 Subject: MAINT-5023 FIXED URIparser crash in LLUrlEntryBase::urlToLabelWithGreyQuery --- indra/llcommon/lluriparser.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'indra/llcommon') 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); } } -- cgit v1.2.3