From fbc7449fa39b5ad3424a80bda0e8563db546a58b Mon Sep 17 00:00:00 2001 From: JUN FANG Date: Fri, 3 Apr 2015 11:35:50 -0700 Subject: Merge to XFA: Add embedder test comparing with the last patch. When there is a wrong keyword like '??ze' in the dictionary of the trailer, PDFium can't recognize it and aborts further parsing. After this change, PDFium continues even it can't get the right size at this moment. It will rebuild the cross reference table later since the size of the table is missing. BUG=459580 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1055323003 --- testing/resources/bug_459580.in | 47 +++++++++++++++++++++++++++++++++ testing/resources/bug_459580.pdf | 57 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 testing/resources/bug_459580.in create mode 100644 testing/resources/bug_459580.pdf (limited to 'testing/resources') diff --git a/testing/resources/bug_459580.in b/testing/resources/bug_459580.in new file mode 100644 index 0000000000..f20c141bc9 --- /dev/null +++ b/testing/resources/bug_459580.in @@ -0,0 +1,47 @@ +{{header}} +{{object 1 0}} << + /Type /Catalog + /Pages 2 0 R +>> +{{object 2 0}} << + /Type /Pages + /MediaBox [ 0 0 600 600 ] + /Count 1 + /Kids [ 3 0 R ] +>> +endobj +{{object 3 0}} << + /Type /Page + /Parent 2 0 R + /Resources << + /Font << + /F1 4 0 R + >> + >> + /Contents 6 0 R +>> +endobj +{{object 4 0}} << + /Type /Font + /Subtype /Type1 + /BaseFont /Times-Roman +>> +endobj + +{{object 6 0}} << +>> +stream +BT +/F1 12 Tf +200 500 Td +(Hello, world! This is a test pdf for bug 459580.) Tj +ET +endstream +endobj +{{xref}} +trailer << + /$$ze 6 + /Root 1 0 R +>> +{{startxref}} +%%EOF diff --git a/testing/resources/bug_459580.pdf b/testing/resources/bug_459580.pdf new file mode 100644 index 0000000000..af33efcaec --- /dev/null +++ b/testing/resources/bug_459580.pdf @@ -0,0 +1,57 @@ +%PDF-1.7 +% ò¤ô +1 0 obj << + /Type /Catalog + /Pages 2 0 R +>> +2 0 obj << + /Type /Pages + /MediaBox [ 0 0 600 600 ] + /Count 1 + /Kids [ 3 0 R ] +>> +endobj +3 0 obj << + /Type /Page + /Parent 2 0 R + /Resources << + /Font << + /F1 4 0 R + >> + >> + /Contents 6 0 R +>> +endobj +4 0 obj << + /Type /Font + /Subtype /Type1 + /BaseFont /Times-Roman +>> +endobj + +6 0 obj << +>> +stream +BT +/F1 12 Tf +200 500 Td +(Hello, world! This is a test pdf for bug 459580.) Tj +ET +endstream +endobj +xref +0 7 +0000000000 65535 f +0000000015 00000 n +0000000061 00000 n +0000000154 00000 n +0000000374 00000 n +0000000000 65535 f +0000000450 00000 n +trailer << + /$$ze 6 + /Root 1 0 R +>> +startxref +963 +%%EOF -- cgit v1.2.3