1 /* 2 * Copyright 2018 Google, LLC 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #include "../Fuzz.h" 9 #include "SkTestFontMgr.h" 10 #include "SkFontMgrPriv.h" 11 12 void fuzz_MockGPUCanvas(Fuzz* f); 13 14 extern "C" { 15 16 // Set default LSAN options. __lsan_default_options()17 const char *__lsan_default_options() { 18 // Don't print the list of LSAN suppressions on every execution. 19 return "print_suppressions=0"; 20 } 21 LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)22 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { 23 gSkFontMgr_DefaultFactory = &sk_tool_utils::MakePortableFontMgr; 24 auto fuzz = Fuzz(SkData::MakeWithoutCopy(data, size)); 25 fuzz_MockGPUCanvas(&fuzz); 26 return 0; 27 } 28 } // extern "C" 29