diff options
author | Wei Li <weili@chromium.org> | 2016-01-14 15:15:14 -0800 |
---|---|---|
committer | Wei Li <weili@chromium.org> | 2016-01-14 15:15:14 -0800 |
commit | 07fb4cf2caa9590402a1c610b9c9d2fb9976f752 (patch) | |
tree | bc72a65216576fe4e278793155fef38a644f1c0a /fpdfsdk/src | |
parent | 215816b7450a577e186cc0e5f1634c4c6610b86b (diff) | |
download | pdfium-07fb4cf2caa9590402a1c610b9c9d2fb9976f752.tar.xz |
Merge to XFA: Loose checking for trailer's size field
Although trailer's size value is required by spec, other readers such as
Acrobat or libpoppler can handle without it. Loose up the check to be
more tolerant.
BUG=pdfium:213
R=thestig@chromium.org
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1582193002 .
(cherry picked from commit 34291b900ad0472eef582215cfce0d942a40fd16)
Review URL: https://codereview.chromium.org/1589783004 .
Diffstat (limited to 'fpdfsdk/src')
-rw-r--r-- | fpdfsdk/src/fpdfview_embeddertest.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fpdfsdk/src/fpdfview_embeddertest.cpp b/fpdfsdk/src/fpdfview_embeddertest.cpp index 670c640668..09d1f07e82 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 newline at end of file +} |