Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: Source/WebCore/page/ContentSecurityPolicy.cpp

Issue 10690118: Merge 120617 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-malformed-meta-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/page/ContentSecurityPolicy.cpp
===================================================================
--- Source/WebCore/page/ContentSecurityPolicy.cpp (revision 122241)
+++ Source/WebCore/page/ContentSecurityPolicy.cpp (working copy)
@@ -314,7 +314,7 @@
return parseHost(beginHost, position, host, hostHasWildcard);
}
- if (*position == '/') {
+ if (position < end && *position == '/') {
// host/path || host/ || /
// ^ ^ ^
if (!parseHost(beginHost, position, host, hostHasWildcard)
@@ -324,7 +324,7 @@
return true;
}
- if (*position == ':') {
+ if (position < end && *position == ':') {
if (end - position == 1) {
// scheme:
// ^
@@ -345,15 +345,15 @@
skipWhile<isNotColonOrSlash>(position, end);
}
- if (*position == ':') {
+ if (position < end && *position == ':') {
// host:port || scheme://host:port
// ^ ^
beginPort = position;
skipUntil(position, end, '/');
}
}
-
- if (*position == '/') {
+
+ if (position < end && *position == '/') {
// scheme://host/path || scheme://host:port/path
// ^ ^
if (position == beginHost)
« no previous file with comments | « LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-malformed-meta-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698