[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
This commit is contained in:
Omkar Jadhav 2020-10-15 20:07:17 +05:30 committed by GitHub
parent 7452f5738e
commit a24dac5135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 67 additions and 0 deletions

View File

@ -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/

24
projects/cpp-httplib/build.sh Executable file
View File

@ -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.

View File

@ -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