summaryrefslogtreecommitdiffstats
path: root/url/url_canon_relative.cc
diff options
context:
space:
mode:
authoraedla@chromium.org <aedla@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-17 23:21:23 +0000
committeraedla@chromium.org <aedla@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-17 23:21:23 +0000
commit3ca8e38ff57e83fcce76f9b54cd8f8bfa09c34ad (patch)
tree884df285b78bd7b0a97b118a49728f1ac88fb980 /url/url_canon_relative.cc
parent1c412720abedd17fb9d7097d6867d3cf34d7b51e (diff)
downloadchromium_src-3ca8e38ff57e83fcce76f9b54cd8f8bfa09c34ad.zip
chromium_src-3ca8e38ff57e83fcce76f9b54cd8f8bfa09c34ad.tar.gz
chromium_src-3ca8e38ff57e83fcce76f9b54cd8f8bfa09c34ad.tar.bz2
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
Diffstat (limited to 'url/url_canon_relative.cc')
-rw-r--r--url/url_canon_relative.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/url/url_canon_relative.cc b/url/url_canon_relative.cc
index 30956a6..84317f8 100644
--- a/url/url_canon_relative.cc
+++ b/url/url_canon_relative.cc
@@ -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.