summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview_embeddertest.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-01-08 14:36:59 -0800
committerWei Li <weili@chromium.org>2016-01-08 14:36:59 -0800
commit8e3f8931c5dfb22ab3e0cf98821e2cca9369d69e (patch)
tree6f468c2662d3142a10d87de33bd3a00a0369e98f /fpdfsdk/src/fpdfview_embeddertest.cpp
parent1b97664bc5b84c7a2b87cc656f8c6a0476f9b71f (diff)
downloadpdfium-8e3f8931c5dfb22ab3e0cf98821e2cca9369d69e.tar.xz
Merge to XFA: Fix infinite loop caused by parsing same indirect objects
BUG=pdfium:343 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1569343002 . (cherry picked from commit 149f1db8bba85bdf2b40d330c38f2478695ca0d5) Review URL: https://codereview.chromium.org/1575663002 .
Diffstat (limited to 'fpdfsdk/src/fpdfview_embeddertest.cpp')
-rw-r--r--fpdfsdk/src/fpdfview_embeddertest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/fpdfsdk/src/fpdfview_embeddertest.cpp b/fpdfsdk/src/fpdfview_embeddertest.cpp
index 6eb5fb95cd..6a6d076983 100644
--- a/fpdfsdk/src/fpdfview_embeddertest.cpp
+++ b/fpdfsdk/src/fpdfview_embeddertest.cpp
@@ -216,3 +216,9 @@ TEST_F(FPDFViewEmbeddertest, Hang_298) {
TEST_F(FPDFViewEmbeddertest, CrossRefV4Loop) {
EXPECT_TRUE(OpenDocument("bug_xrefv4_loop.pdf"));
}
+
+// The test should pass when circular references to ParseIndirectObject will not
+// cause infinite loop.
+TEST_F(FPDFViewEmbeddertest, Hang_343) {
+ EXPECT_FALSE(OpenDocument("bug_343.pdf"));
+} \ No newline at end of file