mirror of https://github.com/google/oss-fuzz.git
Use fuzzers provided by woff2 (#242)
* add primary contact for woff2 * Use fuzzers provided by woff2
This commit is contained in:
parent
7a4a03bf6b
commit
953471af8e
|
@ -21,21 +21,13 @@ cat brotli/shared.mk | sed -e "s/-no-canonical-prefixes//" \
|
|||
> brotli/shared.mk.temp
|
||||
mv brotli/shared.mk.temp brotli/shared.mk
|
||||
|
||||
cat Makefile | sed -e "s/-no-canonical-prefixes//" \
|
||||
> Makefile.temp
|
||||
mv Makefile.temp Makefile
|
||||
|
||||
# woff2 uses LFLAGS instead of LDFLAGS.
|
||||
make clean
|
||||
make -j$(nproc) CC="$CC $CFLAGS" CXX="$CXX $CXXFLAGS" all
|
||||
make -j$(nproc) CC="$CC $CFLAGS" CXX="$CXX $CXXFLAGS" CANONICAL_PREFIXES= all
|
||||
|
||||
# To avoid multiple main() definitions.
|
||||
rm src/woff2_compress.o src/woff2_decompress.o
|
||||
|
||||
# Build the fuzzer.
|
||||
fuzzer=convert_woff2ttf_fuzzer
|
||||
$CXX $CXXFLAGS -std=c++11 -Isrc \
|
||||
$SRC/$fuzzer.cc -o $OUT/$fuzzer \
|
||||
-lFuzzingEngine src/*.o brotli/dec/*.o brotli/enc/*.o
|
||||
# Build fuzzers
|
||||
for fuzzer_archive in $(ls src/*fuzzer*.a); do
|
||||
$CXX $CXXFLAGS -lFuzzingEngine $fuzzer_archive -o $OUT/${fuzzer_archive%.a}
|
||||
done
|
||||
|
||||
cp $SRC/*.options $OUT/
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "woff2_dec.h"
|
||||
|
||||
// Entry point for LibFuzzer.
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
std::string buf;
|
||||
woff2::WOFF2StringOut out(&buf);
|
||||
out.SetMaxSize(30 * 1024 * 1024);
|
||||
woff2::ConvertWOFF2ToTTF(data, size, &out);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue