e4be55dc28
This also includes a helper "fuzzer" for making a corpus. Point it at an image or folder of images and it will decode those images and write the SkPixmap's bytes to disk, such that the fuzzer will be able to read in those bytes as if it had decoded the image (or gotten it from another source). Bug: skia: Change-Id: Iaf223a39078f2b62908fb47929add5d63f22d973 Reviewed-on: https://skia-review.googlesource.com/117367 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
17 lines
376 B
C++
17 lines
376 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.
|
|
*/
|
|
|
|
#include "../Fuzz.h"
|
|
|
|
void fuzz_PNGEncoder(Fuzz* f);
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
|
auto fuzz = Fuzz(SkData::MakeWithoutCopy(data, size));
|
|
fuzz_PNGEncoder(&fuzz);
|
|
return 0;
|
|
}
|