diff --git a/projects/libhttpserver/Dockerfile b/projects/libhttpserver/Dockerfile new file mode 100644 index 000000000000..06d92b4ceb29 --- /dev/null +++ b/projects/libhttpserver/Dockerfile @@ -0,0 +1,23 @@ +# 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 +RUN apt-get install -y libgnutls-dev wget curl +RUN wget --no-check-certificate https://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-latest.tar.gz +RUN git clone --depth 1 --branch fuzzing_PR https://github.com/sgbhat2/libhttpserver.git libhttpserver +WORKDIR libhttpserver +COPY build.sh $SRC/ diff --git a/projects/libhttpserver/build.sh b/projects/libhttpserver/build.sh new file mode 100755 index 000000000000..b314ed573be6 --- /dev/null +++ b/projects/libhttpserver/build.sh @@ -0,0 +1,35 @@ +#!/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. +# +################################################################################ + +cd $SRC +tar -xf libmicrohttpd-latest.tar.gz +cd libmicrohttpd* +./configure +make +make install + +cd $SRC/libhttpserver +./bootstrap +mkdir build; cd build +../configure --enable-shared=no +make +make install + +cd ../test/fuzz +$CXX $CXXFLAGS -std=c++11 basic_fuzzer.cc -o $OUT/basic_fuzzer $LIB_FUZZING_ENGINE /usr/local/lib/libhttpserver.a /usr/local/lib/libmicrohttpd.a -lgnutls +$CXX $CXXFLAGS -std=c++11 ip_representation.cc -o $OUT/ip_representation $LIB_FUZZING_ENGINE /usr/local/lib/libhttpserver.a /usr/local/lib/libmicrohttpd.a -lgnutls +cp *.zip $OUT diff --git a/projects/libhttpserver/project.yaml b/projects/libhttpserver/project.yaml new file mode 100644 index 000000000000..255e12875121 --- /dev/null +++ b/projects/libhttpserver/project.yaml @@ -0,0 +1,8 @@ +homepage: "https://github.com/etr/libhttpserver" +main_repo: "https://github.com/etr/libhttpserver" +language: c++ +primary_contact: "electrictwister2000@gmail.com" +auto_ccs: + - "shilpa.bhat11@gmail.com" +sanitizers: + - address