summaryrefslogtreecommitdiff
path: root/testing/resources
diff options
context:
space:
mode:
authorOliver Chang <ochang@chromium.org>2015-11-11 16:41:26 -0800
committerOliver Chang <ochang@chromium.org>2015-11-11 16:41:26 -0800
commit46bed62931ffc9e482525de4525a6e54043c6899 (patch)
treee8ebd207cb990ecacbdef7f5c8b8bb1e068b04f8 /testing/resources
parent945fdb70f022952e9ed53847649226369352920a (diff)
downloadpdfium-46bed62931ffc9e482525de4525a6e54043c6899.tar.xz
Merge to XFA: Fix extraction of colour components in CPDF_DIBSource::DownSampleScanline32Bit
Previously, if |m_bpc| was < 8 (e.g. 4), this function may still try to access the source components as if |m_bpc| == 8. Even when it fell into the codepath that tried to do the right thing in this case, it was wrong. BUG=554151 TBR=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/9b99615806e358fdb396d1cb162ee2e69c2a20ec Review URL: https://codereview.chromium.org/1433423002 . (cherry picked from commit e21fe98d5b5da7da01503b985b07b90c8e811689) Review URL: https://codereview.chromium.org/1441563002 .
Diffstat (limited to 'testing/resources')
-rw-r--r--testing/resources/bug_554151.in59
-rw-r--r--testing/resources/bug_554151.pdf70
2 files changed, 129 insertions, 0 deletions
diff --git a/testing/resources/bug_554151.in b/testing/resources/bug_554151.in
new file mode 100644
index 0000000000..3087159f51
--- /dev/null
+++ b/testing/resources/bug_554151.in
@@ -0,0 +1,59 @@
+{{header}}
+
+{{object 1 0}}
+<<
+ /Pages 2 0 R
+>>
+endobj
+
+{{object 2 0}}
+<<
+ /Kids [ 3 0 R ]
+>>
+endobj
+
+{{object 3 0}}
+<<
+ /Contents 6 0 R
+ /Resources 5 0 R
+>>
+endobj
+
+{{object 6 0}}
+<<>>
+stream
+612 0.0 0.0 104000 0 0 cm
+/XBad Do
+endstream
+endobj
+
+{{object 5 0}}
+<<
+ /XObject <<
+ /XBad 7 0 R
+ >>
+>>
+endobj
+
+{{object 7 0}}
+<<
+ /Type /XObject
+ /Subtype /Image
+ /Width 612
+ /Height 104000
+ /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{startxref}}
+%%EOF
diff --git a/testing/resources/bug_554151.pdf b/testing/resources/bug_554151.pdf
new file mode 100644
index 0000000000..fa770a7b37
--- /dev/null
+++ b/testing/resources/bug_554151.pdf
@@ -0,0 +1,70 @@
+%PDF-1.7
+% ò¤ô
+
+1 0 obj
+<<
+ /Pages 2 0 R
+>>
+endobj
+
+2 0 obj
+<<
+ /Kids [ 3 0 R ]
+>>
+endobj
+
+3 0 obj
+<<
+ /Contents 6 0 R
+ /Resources 5 0 R
+>>
+endobj
+
+6 0 obj
+<<>>
+stream
+612 0.0 0.0 104000 0 0 cm
+/XBad Do
+endstream
+endobj
+
+5 0 obj
+<<
+ /XObject <<
+ /XBad 7 0 R
+ >>
+>>
+endobj
+
+7 0 obj
+<<
+ /Type /XObject
+ /Subtype /Image
+ /Width 612
+ /Height 104000
+ /ColorSpace /DeviceRGB
+ /BitsPerComponent 4
+ /Length 0
+ /Decode [1.0]
+>>
+stream
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF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