Bug 1494222: Add source bytes to fix qcms_fuzzer coverage. r=agaynor
authorThomas P. <pdknsk+mozilla@gmail.com>
Sun, 07 Oct 2018 21:21:34 +0000
changeset 488575 1fd19353d27cc6f3062306a95a28471a8af273e7
parent 488552 0bfaf23618510b770d86e35e449e9c13a9e9a63e
child 488576 e1c02731e238c9ddc4c03d624b388563953be819
push id246
push userfmarier@mozilla.com
push dateSat, 13 Oct 2018 00:15:40 +0000
reviewersagaynor
bugs1494222
milestone64.0a1
Bug 1494222: Add source bytes to fix qcms_fuzzer coverage. r=agaynor
gfx/qcms/fuzztest/qcms_fuzzer.cpp
--- a/gfx/qcms/fuzztest/qcms_fuzzer.cpp
+++ b/gfx/qcms/fuzztest/qcms_fuzzer.cpp
@@ -46,16 +46,18 @@ transform(qcms_profile* src_profile, qcm
   qcms_transform* transform =
     qcms_transform_create(src_profile, src_type, dst_profile, dst_type, intent);
   if (!transform) {
     return;
   }
 
   static uint8_t src[] = {
     0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, 0xFF, 0x7F, 0x10, 0x20, 0x30,
+    0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0xBF, 0xEF, 0x6F,
+    0x3F, 0xC0, 0x9F, 0xE0, 0x90, 0xCF, 0x40, 0xAF, 0x0F, 0x01, 0x60, 0xF0,
   };
   static uint8_t dst[sizeof(src) * 4]; // 4x in case of GRAY to RGBA
 
   int src_bytes_per_pixel = 4; // QCMS_DATA_RGBA_8
   if (src_type == QCMS_DATA_RGB_8) {
     src_bytes_per_pixel = 3;
   } else if (src_type == QCMS_DATA_GRAYA_8) {
     src_bytes_per_pixel = 2;