Add a pixel test with a sRGB colorspace and a large sc operand value

Test what happens when a very large float number does not fit in a
uint32_t. PDF implementations that clamp the operand value will display
all white, while implementations that do not will likely display cyan.

Bug: b/324312389
Change-Id: Iee326b027f355f490d429f2800c743a735fb130a
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117153
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Thomas Sepez <tsepez@google.com>
diff --git a/testing/resources/pixel/icc_profile_bad_value.in b/testing/resources/pixel/icc_profile_bad_value.in
new file mode 100644
index 0000000..f54ba77
--- /dev/null
+++ b/testing/resources/pixel/icc_profile_bad_value.in
@@ -0,0 +1,51 @@
+{{header}}
+{{object 1 0}} <<
+  /Type /Catalog
+  /Pages 2 0 R
+>>
+endobj
+{{object 2 0}} <<
+  /Type /Pages
+  /Count 1
+  /Kids [3 0 R]
+>>
+endobj
+{{object 3 0}} <<
+  /Type /Page
+  /Parent 2 0 R
+  /Contents [4 0 R]
+  /MediaBox [0 0 100 100]
+  /Resources <<
+    /ColorSpace <<
+      /CS0 [/ICCBased 5 0 R]
+    >>
+  >>
+>>
+endobj
+{{object 4 0}} <<
+  {{streamlen}}
+>>
+stream
+q
+/CS0 cs
+% This value, when multiplied by 255, does not fit in a uint32_t.
+80000000 1 1 sc
+0 0 100 100 re f
+Q
+endstream
+endobj
+% This dummy ICC profile has the right characteristics so DetectSRGB() returns
+% true.
+{{object 5 0}} <<
+  /Filter [/ASCII85Decode /FlateDecode]
+  /N 3
+  {{streamlen}}
+>>
+stream
+GhQ(m(^5Nu'F201.<rEbRi,CuRHYXS)3+pC-l<,_?keQO;(r>H_'g.JJ-u>hNJc`~>
+endstream
+endobj
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/pixel/icc_profile_bad_value_expected.pdf.0.png b/testing/resources/pixel/icc_profile_bad_value_expected.pdf.0.png
new file mode 100644
index 0000000..f6f907e2
--- /dev/null
+++ b/testing/resources/pixel/icc_profile_bad_value_expected.pdf.0.png
Binary files differ