summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfview_embeddertest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfview_embeddertest.cpp b/fpdfsdk/fpdfview_embeddertest.cpp
index 0e478b448f..8576104c2e 100644
--- a/fpdfsdk/fpdfview_embeddertest.cpp
+++ b/fpdfsdk/fpdfview_embeddertest.cpp
@@ -318,6 +318,13 @@ TEST_F(FPDFViewEmbeddertest, Hang_298) {
// reference loop. Cross references will be rebuilt successfully.
TEST_F(FPDFViewEmbeddertest, CrossRefV4Loop) {
EXPECT_TRUE(OpenDocument("bug_xrefv4_loop.pdf"));
+
+ // Make sure calling FPDFAvail_IsDocAvail() on this file does not infinite
+ // loop either. See bug 875.
+ int ret = PDF_DATA_NOTAVAIL;
+ while (ret == PDF_DATA_NOTAVAIL)
+ ret = FPDFAvail_IsDocAvail(avail_, &hints_);
+ EXPECT_EQ(PDF_DATA_AVAIL, ret);
}
// The test should pass when circular references to ParseIndirectObject will not