aboutsummaryrefslogtreecommitdiff
path: root/projects/cpp-httplib
diff options
context:
space:
mode:
authorOmkar Jadhav <jadhavos43@gmail.com>2020-10-15 20:07:17 +0530
committerGitHub <noreply@github.com>2020-10-15 07:37:17 -0700
commita24dac5135c6598a09386c27297e2e0d47349e82 (patch)
tree0474ed1a7206efff568da832d7f95eccf123897a /projects/cpp-httplib
parent7452f5738e596abb9088b026428f399e64779012 (diff)
downloadoss-fuzz-a24dac5135c6598a09386c27297e2e0d47349e82.tar.gz
[yhirose/cpp-httplib] Add to oss-fuzz (#4508)
* Add cpp-httplib to oss-fuzz * change primary contact in project.yaml * Remove fuzzing_engines property from project.yaml * Incorporate new changes in httplib.h * Disable i386 config * Remove memory sanitizer * Fix formatting issues * 1. Use official repo 2. Add new email to autocc
Diffstat (limited to 'projects/cpp-httplib')
-rw-r--r--projects/cpp-httplib/Dockerfile34
-rwxr-xr-xprojects/cpp-httplib/build.sh24
-rw-r--r--projects/cpp-httplib/project.yaml9
3 files changed, 67 insertions, 0 deletions
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