Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: fpdfsdk/src/fpdfview_embeddertest.cpp

Issue 1585823003: Correct the way to count pages and to avoid infinite loop (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: remove a function Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/src/fpdfview_embeddertest.cpp
diff --git a/fpdfsdk/src/fpdfview_embeddertest.cpp b/fpdfsdk/src/fpdfview_embeddertest.cpp
index 3147c01660ee2102b877787aac5a1fe118b4cde8..670c640668c65edca6dcf944cc061d8fd96b38d2 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"));
}

Powered by Google App Engine
This is Rietveld 408576698