bc9a1a837d
Some oss-fuzz bugs (like the linked one) would not reproduce in Skia proper due to the fact that there were subtle overloads of the various Fuzz::next() methods in FuzzCanvas.cpp that were pulled in in Skia proper, but not oss-fuzz. This puts all of them in to FuzzCommon.h and makes the matrix and rrect ones opt-in (fuzz_matrix, fuzz_rrect). Additionally, this renames fuzz.cpp -> FuzzMain.cpp so we can properly include Fuzz.cpp in oss-fuzz without having two mains. Bug: oss-fuzz:10378 Change-Id: I6cf9afb471781b9fadb689482109a1e5662358b5 Reviewed-on: https://skia-review.googlesource.com/154900 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
30 lines
665 B
C
30 lines
665 B
C
/*
|
|
* Copyright 2018 Google, LLC
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef FuzzCommon_DEFINED
|
|
#define FuzzCommon_DEFINED
|
|
|
|
#include "Fuzz.h"
|
|
#include "SkMatrix.h"
|
|
#include "SkPath.h"
|
|
#include "SkRRect.h"
|
|
#include "SkRegion.h"
|
|
|
|
// allows some float values for path points
|
|
void FuzzPath(Fuzz* fuzz, SkPath* path, int maxOps);
|
|
// allows all float values for path points
|
|
void BuildPath(Fuzz* fuzz, SkPath* path, int last_verb);
|
|
|
|
void FuzzNiceRRect(Fuzz* fuzz, SkRRect* rr);
|
|
|
|
void FuzzNiceMatrix(Fuzz* fuzz, SkMatrix* m);
|
|
|
|
void FuzzNiceRegion(Fuzz* fuzz, SkRegion* region, int maxN);
|
|
|
|
#endif
|
|
|