Skip to content
Snippets Groups Projects
Commit acf48e09 authored by Henri Sivonen's avatar Henri Sivonen
Browse files

Bug 1747264 - Avoid OOMing if the URL of an XML document is huge. r=smaug, a=dsmith

parent 461829be
No related branches found
No related tags found
No related merge requests found
......@@ -688,7 +688,10 @@ nsParser::Parse(nsIURI* aURL, void* aKey) {
if (rv != NS_OK) {
return rv;
}
NS_ConvertUTF8toUTF16 theName(spec);
nsString theName; // Not nsAutoString due to length and usage
if (!CopyUTF8toUTF16(spec, theName, mozilla::fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
}
nsScanner* theScanner = new nsScanner(theName, false);
CParserContext* pc =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment