diff options
author | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-08 00:08:22 +0000 |
---|---|---|
committer | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-08 00:08:22 +0000 |
commit | 7bd904b2052fe21762ae7cd2ee70e829eb5524e0 (patch) | |
tree | 5d305c7bf13d460695b31fce7f600110d5ec0721 /chrome/common/chrome_constants.h | |
parent | ba3ccd34fe2a47f1fe58126dc482c1b43ed00361 (diff) | |
download | chromium_src-7bd904b2052fe21762ae7cd2ee70e829eb5524e0.zip chromium_src-7bd904b2052fe21762ae7cd2ee70e829eb5524e0.tar.gz chromium_src-7bd904b2052fe21762ae7cd2ee70e829eb5524e0.tar.bz2 |
Avoid accepting suspiciously long URLs from the renderer. These can take down
the browser with OOM.
BUG=20233
TEST=NONE
Review URL: http://codereview.chromium.org/523088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35757 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_constants.h')
-rw-r--r-- | chrome/common/chrome_constants.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h index ea79fd8..c8121d0 100644 --- a/chrome/common/chrome_constants.h +++ b/chrome/common/chrome_constants.h @@ -67,8 +67,12 @@ extern const int kStatsMaxThreads; extern const int kStatsMaxCounters; // The maximum number of characters of the document's title that we're willing -// to send to the browser process. +// to accept in the browser process. extern const size_t kMaxTitleChars; +// The maximum number of characters in the URL that we're willing to accept +// in the browser process. It is set low enough to avoid damage to the browser +// but high enough that a web site can abuse location.hash for a little storage. +extern const size_t kMaxURLChars; extern const bool kRecordModeEnabled; |