Commit 3ca8e38f authored by aedla@chromium.org's avatar aedla@chromium.org

Fix OOB read when parsing protocol-relative URLs

BUG=285742

Review URL: https://chromiumcodereview.appspot.com/23902014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223735 0039d316-1c4b-4281-b951-d872f2087c98
parent 1c412720
......@@ -372,9 +372,8 @@ bool DoResolveRelativeHost(const char* base_url,
// Parse the relative URL, just like we would for anything following a
// scheme.
url_parse::Parsed relative_parsed; // Everything but the scheme is valid.
url_parse::ParseAfterScheme(&relative_url[relative_component.begin],
relative_component.len, relative_component.begin,
&relative_parsed);
url_parse::ParseAfterScheme(relative_url, relative_component.end(),
relative_component.begin, &relative_parsed);
// Now we can just use the replacement function to replace all the necessary
// parts of the old URL with the new one.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment