commit | babba97ae63a2d8de425c7cc3926d5824f647b9c | [log] [tgz] |
---|---|---|
author | Zepeng Hu <zepenghu@google.com> | Wed Jul 08 16:37:22 2020 +0000 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Wed Jul 08 19:30:00 2020 +0000 |
tree | 9486c978be248f89b86d9c31b25aca77d45ceb0b | |
parent | afa90369cb3592fc70869e43ac95c3865b104777 [diff] |
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>
diff --git a/fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp b/fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp index 6642539..71bb49b 100644 --- a/fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp +++ b/fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp
@@ -6,10 +6,13 @@ */ #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;