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

Unified Diff: fpdfsdk/src/fpdfview_embeddertest.cpp

Issue 1582193002: Loose checking for trailer's size field (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments and rebase 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
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | testing/resources/bug_213.pdf » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfview_embeddertest.cpp
diff --git a/fpdfsdk/src/fpdfview_embeddertest.cpp b/fpdfsdk/src/fpdfview_embeddertest.cpp
index 670c640668c65edca6dcf944cc061d8fd96b38d2..09d1f07e8204a4f6730a6e0ab56be01ff0a4adb5 100644
--- a/fpdfsdk/src/fpdfview_embeddertest.cpp
+++ b/fpdfsdk/src/fpdfview_embeddertest.cpp
@@ -204,6 +204,12 @@ TEST_F(FPDFViewEmbeddertest, Crasher_572871) {
EXPECT_TRUE(OpenDocument("bug_572871.pdf"));
}
+// It tests that document can still be loaded even the trailer has no 'Size'
+// field if other information is right.
+TEST_F(FPDFViewEmbeddertest, Failed_213) {
+ EXPECT_TRUE(OpenDocument("bug_213.pdf"));
+}
+
// The following tests pass if the document opens without infinite looping.
TEST_F(FPDFViewEmbeddertest, Hang_298) {
EXPECT_FALSE(OpenDocument("bug_298.pdf"));
@@ -232,4 +238,4 @@ TEST_F(FPDFViewEmbeddertest, Hang_344) {
// 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 previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | testing/resources/bug_213.pdf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698