summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorJun Fang <jun_fang@foxitsoftware.com>2015-10-28 18:36:28 +0800
committerJun Fang <jun_fang@foxitsoftware.com>2015-10-28 18:36:28 +0800
commitbf18cb6220aa19a64d2705640aad29d3f86ed04a (patch)
tree0f4854bd1ba7675fac2fd3deec353c5b84d78809 /testing
parentd43ebdd78a854ebdaa7de301321ef8e698541bd6 (diff)
downloadpdfium-bf18cb6220aa19a64d2705640aad29d3f86ed04a.tar.xz
A crasher due to lacking 'template' node in XFA file
A template node is mandatory in XFA file. Pdfium should ignore processing it when no template node is found in XFA file. BUG=pdfium:216 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1423903002 .
Diffstat (limited to 'testing')
-rw-r--r--testing/resources/bug_216.in39
-rw-r--r--testing/resources/bug_216.pdf40
2 files changed, 79 insertions, 0 deletions
diff --git a/testing/resources/bug_216.in b/testing/resources/bug_216.in
new file mode 100644
index 0000000000..1ecd862c17
--- /dev/null
+++ b/testing/resources/bug_216.in
@@ -0,0 +1,39 @@
+{{header}}
+{{object 1 0}} <<
+ /Type /Catalog
+ /Pages 2 0 R
+ /AcroForm 4 0 R
+>>
+endobj
+{{object 2 0}} <<
+ /Type /Pages
+ /Count 1
+>>
+endobj
+{{object 4 0}} <<
+ /XFA [
+ (xdp:xdp) 23 0 R
+ (form) 29 0 R
+ (</xdp:xdp>) 30 0 R]
+>>
+endobj
+{{object 23 0}} <<
+>>stream
+<?xml version="1.0" encoding="UTF-8"?>
+<xdp:xdp xmlns:xdp="http://www.foxitsoftware.com/">
+endstream
+endobj
+{{object 29 0}} <<
+>>stream
+<form xmlns="http://www.xfa.org/schema/xfa-form/2.6/">
+</form>
+endstream
+endobj
+{{object 30 0}} <<
+>>stream
+</xdp:xdp>
+endstream
+endobj
+trailer
+<</Root 1 0 R>>
+%%EOF
diff --git a/testing/resources/bug_216.pdf b/testing/resources/bug_216.pdf
new file mode 100644
index 0000000000..2d5987277f
--- /dev/null
+++ b/testing/resources/bug_216.pdf
@@ -0,0 +1,40 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj <<
+ /Type /Catalog
+ /Pages 2 0 R
+ /AcroForm 4 0 R
+>>
+endobj
+2 0 obj <<
+ /Type /Pages
+ /Count 1
+>>
+endobj
+4 0 obj <<
+ /XFA [
+ (xdp:xdp) 23 0 R
+ (form) 29 0 R
+ (</xdp:xdp>) 30 0 R]
+>>
+endobj
+23 0 obj <<
+>>stream
+<?xml version="1.0" encoding="UTF-8"?>
+<xdp:xdp xmlns:xdp="http://www.foxitsoftware.com/">
+endstream
+endobj
+29 0 obj <<
+>>stream
+<form xmlns="http://www.xfa.org/schema/xfa-form/2.6/">
+</form>
+endstream
+endobj
+30 0 obj <<
+>>stream
+</xdp:xdp>
+endstream
+endobj
+trailer
+<</Root 1 0 R>>
+%%EOF