From 312960436f70e5004a0c793ee7f8f453be84d074 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 16 Dec 2019 17:33:22 +0100 Subject: [PATCH 1/2] Add OSS-Fuzz badge to the README The project asks to do it and it only seems right to do so. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index df2e8bd46d..64485c6056 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Platforms [![AppVeyor](https://img.shields.io/appveyor/ci/wxWidgets/wxWidgets/master.svg?label=Windows)](https://ci.appveyor.com/project/wxWidgets/wxwidgets) [![Travis](https://img.shields.io/travis/wxWidgets/wxWidgets/master.svg?label=Linux)](https://travis-ci.org/wxWidgets/wxWidgets) +[![OSS-Fuzz](https://oss-fuzz-build-logs.storage.googleapis.com/badges/wxwidgets.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:wxwidgets) This version of wxWidgets supports the following primary platforms: From 5de964cecc1e39f8a115f92f578fa393d9d4622f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 16 Dec 2019 17:36:15 +0100 Subject: [PATCH 2/2] Add the script run by OSS-Fuzz This script used to live in oss-fuzz repository itself (under projects/wxwidgets), but it seems better to have it in the main repository, as this will make modifying it, e.g. to add new fuzzers, simpler. --- tests/fuzz/ossfuzz.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 tests/fuzz/ossfuzz.sh diff --git a/tests/fuzz/ossfuzz.sh b/tests/fuzz/ossfuzz.sh new file mode 100755 index 0000000000..8c94f3f3f3 --- /dev/null +++ b/tests/fuzz/ossfuzz.sh @@ -0,0 +1,12 @@ +#!/bin/bash -eu + +# build project +./configure --without-subdirs --disable-shared --disable-sys-libs --disable-gui LDFLAGS="$CXXFLAGS" +make -j$(nproc) + +# build fuzzers +$CXX $CXXFLAGS -o $OUT/zip tests/fuzz/zip.cpp \ + $LIB_FUZZING_ENGINE `./wx-config --cxxflags --libs base` + +# and copy their corpora +zip -j $OUT/zip_seed_corpus.zip tests/fuzz/corpus/zip/*