From 215816b7450a577e186cc0e5f1634c4c6610b86b Mon Sep 17 00:00:00 2001 From: Wei Li Date: Thu, 14 Jan 2016 12:29:02 -0800 Subject: Merge to XFA: Correct the way to count pages and to avoid infinite loop BUG=pdfium:360 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1585823003 . (cherry picked from commit 5d5d9fe7bd1c9566b9d6570015b7c60894d9fc0c) Review URL: https://codereview.chromium.org/1583073004 . --- fpdfsdk/src/fpdfview_embeddertest.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fpdfsdk/src') diff --git a/fpdfsdk/src/fpdfview_embeddertest.cpp b/fpdfsdk/src/fpdfview_embeddertest.cpp index 3147c01660..670c640668 100644 --- a/fpdfsdk/src/fpdfview_embeddertest.cpp +++ b/fpdfsdk/src/fpdfview_embeddertest.cpp @@ -227,4 +227,9 @@ TEST_F(FPDFViewEmbeddertest, Hang_343) { // dictionary will not cause an infinite loop in CPDF_SyntaxParser::GetObject(). TEST_F(FPDFViewEmbeddertest, Hang_344) { EXPECT_FALSE(OpenDocument("bug_344.pdf")); +} + +// The test should pass even when the file has circular references to pages. +TEST_F(FPDFViewEmbeddertest, Hang_360) { + EXPECT_FALSE(OpenDocument("bug_360.pdf")); } \ No newline at end of file -- cgit v1.2.3