summaryrefslogtreecommitdiffstats
path: root/net/http/http_chunked_decoder_unittest.cc
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-18 04:58:34 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-18 04:58:34 +0000
commit9d65ad87c64ec57473b42ed290472ddec99e55c6 (patch)
treed6f04f97dfa552de5e4f1fb061bede79c8a00cdb /net/http/http_chunked_decoder_unittest.cc
parentfc1124064b408b4be6c4302f9b2040d4fe5dbf77 (diff)
downloadchromium_src-9d65ad87c64ec57473b42ed290472ddec99e55c6.zip
chromium_src-9d65ad87c64ec57473b42ed290472ddec99e55c6.tar.gz
chromium_src-9d65ad87c64ec57473b42ed290472ddec99e55c6.tar.bz2
Improve chunked encoding parsing.
R=abarth BUG=14508 TEST=HttpChunkedDecoderTest.ExcessiveChunkLen Patch contributed by Chris Evans. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_chunked_decoder_unittest.cc')
-rw-r--r--net/http/http_chunked_decoder_unittest.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/http/http_chunked_decoder_unittest.cc b/net/http/http_chunked_decoder_unittest.cc
index 51fbba0..f335f0a 100644
--- a/net/http/http_chunked_decoder_unittest.cc
+++ b/net/http/http_chunked_decoder_unittest.cc
@@ -266,3 +266,10 @@ TEST(HttpChunkedDecoderTest, InvalidConsecutiveCRLFs) {
};
RunTestUntilFailure(inputs, arraysize(inputs), 1);
}
+
+TEST(HttpChunkedDecoderTest, ExcessiveChunkLen) {
+ const char* inputs[] = {
+ "c0000000\r\nhello\r\n"
+ };
+ RunTestUntilFailure(inputs, arraysize(inputs), 0);
+}