1 // Copyright 2016 The PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include <cstdint> 6 7 #include "core/fxcodec/icc/iccmodule.h" 8 #include "third_party/base/span.h" 9 LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)10extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 11 std::unique_ptr<CLcmsCmm> transform = 12 IccModule::CreateTransformSRGB(pdfium::make_span(data, size)); 13 14 if (transform) { 15 float src[4]; 16 float dst[4]; 17 for (int i = 0; i < 4; i++) 18 src[i] = 0.5f; 19 IccModule::Translate(transform.get(), transform->components(), src, dst); 20 } 21 22 return 0; 23 } 24