summaryrefslogtreecommitdiff
path: root/fpdfsdk/src
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-09 20:15:18 -0800
committerLei Zhang <thestig@chromium.org>2015-12-09 20:15:18 -0800
commit93181f9a20db7ac706bb9405750303db93762a5b (patch)
tree8bbaaaf8c4fcf84002d948db174fd53fec24beb5 /fpdfsdk/src
parent3d8f56d817baf2864caac844f0b403b5da7ef8b0 (diff)
downloadpdfium-93181f9a20db7ac706bb9405750303db93762a5b.tar.xz
Prevent infinite looping in CPDF_Parser::LoadAllCrossRefV5().
BUG=pdfium:298 R=weili@chromium.org Review URL: https://codereview.chromium.org/1496703005 .
Diffstat (limited to 'fpdfsdk/src')
-rw-r--r--fpdfsdk/src/fpdfview_embeddertest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/fpdfsdk/src/fpdfview_embeddertest.cpp b/fpdfsdk/src/fpdfview_embeddertest.cpp
index 35da9b6caf..3be96e7aef 100644
--- a/fpdfsdk/src/fpdfview_embeddertest.cpp
+++ b/fpdfsdk/src/fpdfview_embeddertest.cpp
@@ -199,3 +199,8 @@ TEST_F(FPDFViewEmbeddertest, Crasher_454695) {
// Document is damanged and can't be opened.
EXPECT_FALSE(OpenDocument("bug_454695.pdf"));
}
+
+// The following tests pass if the document opens without infinite looping.
+TEST_F(FPDFViewEmbeddertest, Hang_298) {
+ EXPECT_FALSE(OpenDocument("bug_298.pdf"));
+}