From acc0d96fda8b5389f30bf47ca297ca8755f9778c Mon Sep 17 00:00:00 2001 From: "deanm@google.com" Date: Wed, 3 Sep 2008 16:05:52 +0000 Subject: 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 --- net/base/escape_unittest.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'net/base/escape_unittest.cc') 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"+%%%+%%%"}, -- cgit v1.1