mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1344558 - Avoid OOM in nsSimpleURI::SetPath r=mcmanus
MozReview-Commit-ID: JWlN5Q6H59Q --HG-- extra : rebase_source : f3f1971f33d8fe6b560c1a9aca307219725713c6
This commit is contained in:
parent
855c64b0d5
commit
55e829f800
@ -424,7 +424,10 @@ nsSimpleURI::SetPath(const nsACString &aPath)
|
||||
{
|
||||
NS_ENSURE_STATE(mMutable);
|
||||
|
||||
nsAutoCString path(aPath);
|
||||
nsAutoCString path;
|
||||
if (!path.Assign(aPath, fallible)) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
int32_t queryPos = path.FindChar('?');
|
||||
int32_t hashPos = path.FindChar('#');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user