Fix for bug 139362. In order to avoid to be hit by bug 70083, we need to do a copy of the string we are passing to NewURI to be sure it's in one segment. Patch proposed by jag. R=ducarroz, SR=sspitzer

This commit is contained in:
ducarroz%netscape.com 2002-05-10 21:00:03 +00:00
Родитель 28495a117d
Коммит 8c59ba4290
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -1610,10 +1610,12 @@ nsMsgNewURL(nsIURI** aInstancePtrResult, const char * aSpec)
{
if (PL_strstr(aSpec, "://") == nsnull)
{
rv = pNetService->NewURI(NS_LITERAL_CSTRING("http://") + nsDependentCString(aSpec), nsnull, nsnull, aInstancePtrResult);
}
else
rv = pNetService->NewURI(nsDependentCString(aSpec), nsnull, nsnull, aInstancePtrResult);
//XXXjag Temporary fix for bug 139362 until the real problem(bug 70083) get fixed
nsCAutoString uri(NS_LITERAL_CSTRING("http://") + nsDependentCString(aSpec));
rv = pNetService->NewURI(uri, nsnull, nsnull, aInstancePtrResult);
}
else
rv = pNetService->NewURI(nsDependentCString(aSpec), nsnull, nsnull, aInstancePtrResult);
}
return rv;
}