skia2/fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp
Zepeng Hu babba97ae6 Use test font manager for SVG fuzzer
Change-Id: Ia4f96278e076d300b432b362db5df6b1a1654f3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301218
Commit-Queue: Zepeng Hu <zepenghu@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-07-08 19:30:00 +00:00

20 lines
514 B
C++

/*
* Copyright 2020 Google, LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "fuzz/Fuzz.h"
#include "src/core/SkFontMgrPriv.h"
#include "tools/fonts/TestFontMgr.h"
void fuzz_SVGCanvas(Fuzz* f);
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
gSkFontMgr_DefaultFactory = &ToolUtils::MakePortableFontMgr;
auto fuzz = Fuzz(SkData::MakeWithoutCopy(data, size));
fuzz_SVGCanvas(&fuzz);
return 0;
}