Raptor only. Fix crasher.
git-svn-id: svn://10.0.0.236/trunk@11265 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -503,6 +503,11 @@ nsresult URLImpl::ParseURL(const nsIURL* aURL, const nsString& aSpec)
|
||||
if (cSpec[0] != '\0') {
|
||||
// Strip out old tail component and put in the new one
|
||||
char* dp = PL_strrchr(uFile, '/');
|
||||
if (!dp) {
|
||||
delete cSpec;
|
||||
NS_UNLOCK_INSTANCE();
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
PRInt32 dirlen = (dp + 1) - uFile;
|
||||
mFile = (char*) PR_Malloc(dirlen + len);
|
||||
PL_strncpy(mFile, uFile, dirlen);
|
||||
|
||||
Reference in New Issue
Block a user