diff options
author | deanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-03 16:05:52 +0000 |
---|---|---|
committer | deanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-03 16:05:52 +0000 |
commit | acc0d96fda8b5389f30bf47ca297ca8755f9778c (patch) | |
tree | 965a2916195028bbb1db4848228b20feeea2fbb3 /net/base/escape_unittest.cc | |
parent | d97f57090b098dce74ca27a5f07da979bbc36fa6 (diff) | |
download | chromium_src-acc0d96fda8b5389f30bf47ca297ca8755f9778c.zip chromium_src-acc0d96fda8b5389f30bf47ca297ca8755f9778c.tar.gz chromium_src-acc0d96fda8b5389f30bf47ca297ca8755f9778c.tar.bz2 |
Fix an out of band read when parsing a URL component of just "%". The calculation of max_digit_index is unsigned, and was underflowing when max was less than 2.
BUG=122
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1677 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/escape_unittest.cc')
-rw-r--r-- | net/base/escape_unittest.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/base/escape_unittest.cc b/net/base/escape_unittest.cc index a969a86..3775945 100644 --- a/net/base/escape_unittest.cc +++ b/net/base/escape_unittest.cc @@ -159,6 +159,7 @@ TEST(Escape, UnescapeURLComponent) { TEST(Escape, UnescapeAndDecodeURLComponent) { const UnescapeAndDecodeURLCase unescape_cases[] = { + {"UTF8", "%", "%", "%", L"%"}, {"UTF8", "+", "+", " ", L"+"}, {"UTF8", "%2+", "%2+", "%2 ", L"%2+"}, {"UTF8", "+%%%+%%%", "+%%%+%%%", " %%% %%%", L"+%%%+%%%"}, |