summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview_embeddertest.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-09 23:56:51 -0800
committerLei Zhang <thestig@chromium.org>2015-12-09 23:56:51 -0800
commit5fae972302efd368a3ecc7cfa655891323c59a1b (patch)
treed77db9b3ecb77b129cc05ba69bbd7b74e7c7f0f2 /fpdfsdk/src/fpdfview_embeddertest.cpp
parent3b1707f50e4961c2a350243acbeaaafd89e22fca (diff)
downloadpdfium-5fae972302efd368a3ecc7cfa655891323c59a1b.tar.xz
Merge to XFA: Prevent infinite looping in CPDF_Parser::LoadAllCrossRefV5().
BUG=pdfium:298 TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1496703005 . (cherry picked from commit 93181f9a20db7ac706bb9405750303db93762a5b) Review URL: https://codereview.chromium.org/1514783002 .
Diffstat (limited to 'fpdfsdk/src/fpdfview_embeddertest.cpp')
-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"));
+}