summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2015-12-01 17:45:16 -0800
committerWei Li <weili@chromium.org>2015-12-01 17:45:16 -0800
commit7d1578a9ac083bf186dc3297885bfc56fdb78540 (patch)
tree341e139c105f3c679da4067f16830e040b0a8e17 /testing
parent8aff2a94aa9603f5fed8a157183db94b43b02a96 (diff)
downloadpdfium-7d1578a9ac083bf186dc3297885bfc56fdb78540.tar.xz
Merge to XFA: Add basic checking for RebuildCrossRef
RebuildCrossRef function returns false when we can not find file trailer or any indirect object. This serves as a basic file format checking. BUG=pdfium:215 TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1476163002 . (cherry picked from commit f14da1d58e8e12633c7a47e6efd5ffe43bb37b4b) Review URL: https://codereview.chromium.org/1486383002 .
Diffstat (limited to 'testing')
-rw-r--r--testing/resources/parser_rebuildxref_error_notrailer.pdf51
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/resources/parser_rebuildxref_error_notrailer.pdf b/testing/resources/parser_rebuildxref_error_notrailer.pdf
new file mode 100644
index 0000000000..93f56fba9b
--- /dev/null
+++ b/testing/resources/parser_rebuildxref_error_notrailer.pdf
@@ -0,0 +1,51 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj <<
+ /Type /Catalog
+ /Pages 2 2 R
+>>
+2 2 obj <<
+ /Type /Pages
+ /MediaBox [ 0 0 200 200 ]
+ /Count 1
+ /Kids [ 3 4 R ]
+>>
+endobj
+3 4 obj <<
+ /Type /Page
+ /Parent 2 2 R
+ /Resources <<
+ /Font <<
+ /F1 4 6 R
+ /F2 5 8 R
+ >>
+ >>
+ /Contents 6 0 R
+>>
+endobj
+4 6 obj <<
+ /Type /Font
+ /Subtype /Type1
+ /BaseFont /Times-Roman
+>>
+endobj
+5 8 obj <<
+ /Type /Font
+ /Subtype /Type1
+ /BaseFont /Helvetica
+>>
+endobj
+6 0 obj <<
+>>
+stream
+BT
+20 50 Td
+/F1 12 Tf
+(Hello, world!) Tj
+0 50 Td
+/F2 16 Tf
+(Goodbye, world!) Tj
+ET
+endstream
+endobj
+%%EOF