MAINT-5023 FIXED URIparser crash in LLUrlEntryBase::urlToLabelWithGreyQuery

meow-7.2.2
MNikolenko ProductEngine 2015-04-07 20:58:48 +03:00
parent e03f1521c8
commit dbb304ab20
1 changed files with 3 additions and 5 deletions

View File

@ -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);
}
}