diff --git a/mozilla/netwerk/base/src/nsStdURL.cpp b/mozilla/netwerk/base/src/nsStdURL.cpp index c74ea62dd97..94e95274913 100644 --- a/mozilla/netwerk/base/src/nsStdURL.cpp +++ b/mozilla/netwerk/base/src/nsStdURL.cpp @@ -1323,8 +1323,10 @@ nsStdURL::GetFile(nsIFile * *aFile) #endif // we need to make sure that the filepath is unescaped! - - char* escapedPath = (char*) nsAllocator::Clone((void*)(const char*)path,strlen(path)); + PRUint32 size; + + path.SizeOf(nsnull, &size); + char* escapedPath = (char*) nsAllocator::Clone((void*)(const char*)path,size); nsUnescape(escapedPath); nsCOMPtr localFile;