diff --git a/projects/cpp-httplib/Dockerfile b/projects/cpp-httplib/Dockerfile new file mode 100644 index 000000000..622073808 --- /dev/null +++ b/projects/cpp-httplib/Dockerfile @@ -0,0 +1,34 @@ +# Copyright 2020 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +FROM gcr.io/oss-fuzz-base/base-builder +RUN apt-get update && apt-get install -y make autoconf automake libtool + +# Install brotli. +RUN apt-get install -y libbrotli-dev + +# Install zlib. +RUN apt-get update && apt-get install -y zlib1g-dev + +# Install openssl 1.1.1 +RUN curl -o openssl-1.1.1f.tar.gz https://www.openssl.org/source/openssl-1.1.1f.tar.gz && \ + tar xzvf openssl-1.1.1f.tar.gz +RUN cd openssl-1.1.1f && ./config && make && make install_sw + +RUN git clone --depth 1 https://github.com/yhirose/cpp-httplib.git cpp-httplib + +WORKDIR cpp-httplib +COPY build.sh $SRC/ diff --git a/projects/cpp-httplib/build.sh b/projects/cpp-httplib/build.sh new file mode 100755 index 000000000..0cdbd809d --- /dev/null +++ b/projects/cpp-httplib/build.sh @@ -0,0 +1,24 @@ +#!/bin/bash -eu +# Copyright 2020 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +# Build fuzz targets specified in test/Makefile. +cd test/fuzzing && make -j$(nproc) server_fuzzer + +# Copy the fuzzer executables, zip-ed corpora, option and dictionary files to $OUT. +find . -name '*_fuzzer' -exec cp -v '{}' $OUT ';' # Copy fuzz-target. +find . -name '*_fuzzer.dict' -exec cp -v '{}' $OUT ';' # Copy dictionaries. +find . -name '*_fuzzer_seed_corpus.zip' -exec cp -v '{}' $OUT ';' # Copy seed corpora. diff --git a/projects/cpp-httplib/project.yaml b/projects/cpp-httplib/project.yaml new file mode 100644 index 000000000..d8f236e11 --- /dev/null +++ b/projects/cpp-httplib/project.yaml @@ -0,0 +1,9 @@ +homepage: "https://github.com/yhirose/cpp-httplib" +language: c++ +primary_contact: "yuji.hirose.bug@gmail.com" +auto_ccs : + - "cpp-httplib-oss-fuzz@googlegroups.com" +sanitizers: + - address + - dataflow + - undefined