Skip to content

Commit

Permalink
uriparser: move fuzz targets upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler92 committed Jan 5, 2025
1 parent c8ac14c commit 6d9746d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 221 deletions.
2 changes: 1 addition & 1 deletion projects/uriparser/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y make autoconf automake wget sudo libtool cmake
RUN git clone --depth 1 https://github.com/uriparser/uriparser uriparser
WORKDIR uriparser
COPY build.sh *.cc $SRC/
COPY build.sh "$SRC/"
19 changes: 9 additions & 10 deletions projects/uriparser/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
# build project
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DURIPARSER_BUILD_DOCS:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF -DURIPARSER_BUILD_TESTS:BOOL=OFF ..
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DURIPARSER_OSSFUZZ_BUILD=ON \
-DURIPARSER_BUILD_FUZZERS=ON \
-DURIPARSER_BUILD_DOCS=OFF \
-DURIPARSER_BUILD_TESTS=OFF \
-DURIPARSER_BUILD_TOOLS=OFF \
-DURIPARSER_ENABLE_INSTALL=OFF \
..
make
make install

# build fuzzers
for fuzzers in $(find $SRC -name '*_fuzzer.cc'); do
fuzz_basename=$(basename -s .cc $fuzzers)
$CXX $CXXFLAGS -std=c++11 -I. \
$fuzzers $LIB_FUZZING_ENGINE ./liburiparser.a \
-o $OUT/$fuzz_basename
done
cp fuzz/*_fuzzer "$OUT/"
61 changes: 0 additions & 61 deletions projects/uriparser/uri_dissect_query_malloc_fuzzer.cc

This file was deleted.

29 changes: 0 additions & 29 deletions projects/uriparser/uri_free_fuzzer.cc

This file was deleted.

120 changes: 0 additions & 120 deletions projects/uriparser/uri_parse_fuzzer.cc

This file was deleted.

0 comments on commit 6d9746d

Please sign in to comment.