blob: f6559a74b0ac4fc23c7d972ca5e511d91b0983f8 [file] [log] [blame]
Kevin Lubick486ee3d2018-03-21 10:17:25 -04001/*
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
Mike Kleinc0bd9f92019-04-23 12:05:21 -05008#include "fuzz/Fuzz.h"
9#include "src/core/SkFontMgrPriv.h"
10#include "tools/fonts/TestFontMgr.h"
Kevin Lubick486ee3d2018-03-21 10:17:25 -040011
12void fuzz_RasterN32Canvas(Fuzz* f);
13
14extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
Zepeng Hu5b35f212020-06-14 19:03:34 +000015 if (size > 4000) {
16 return 0;
17 }
Mike Kleinea3f0142019-03-20 11:12:10 -050018 gSkFontMgr_DefaultFactory = &ToolUtils::MakePortableFontMgr;
Kevin Lubick486ee3d2018-03-21 10:17:25 -040019 auto fuzz = Fuzz(SkData::MakeWithoutCopy(data, size));
20 fuzz_RasterN32Canvas(&fuzz);
21 return 0;
22}