summaryrefslogtreecommitdiffstats
path: root/chrome/browser/content_settings
diff options
context:
space:
mode:
authorcevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-14 18:29:50 +0000
committercevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-14 18:29:50 +0000
commit85f2fcc7b577362dd1def5895d60ea70d6e6b8d0 (patch)
tree95ae32f9fb352f00ee28c686b5ce4a20142ad1e4 /chrome/browser/content_settings
parent0dcf95e2aa08c7c21e8c8c084d2ca1f81217c272 (diff)
downloadchromium_src-85f2fcc7b577362dd1def5895d60ea70d6e6b8d0.zip
chromium_src-85f2fcc7b577362dd1def5895d60ea70d6e6b8d0.tar.gz
chromium_src-85f2fcc7b577362dd1def5895d60ea70d6e6b8d0.tar.bz2
Check the content setting type is valid.
BUG=169770 Review URL: https://codereview.chromium.org/11875013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/content_settings')
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index 9f69246..caf6c12 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -255,6 +255,8 @@ void TabSpecificContentSettings::OnContentBlocked(
const std::string& resource_identifier) {
DCHECK(type != CONTENT_SETTINGS_TYPE_GEOLOCATION)
<< "Geolocation settings handled by OnGeolocationPermissionSet";
+ if (type < 0 || type >= CONTENT_SETTINGS_NUM_TYPES)
+ return;
content_accessed_[type] = true;
// Unless UI for resource content settings is enabled, ignore the resource
// identifier.