1#!/bin/bash -eu 2# Copyright 2018 Google Inc. 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16################################################################################ 17 18# build project 19cd libhtp 20sh autogen.sh 21./configure 22make 23 24$CC $CFLAGS -I. -c test/fuzz/fuzz_htp.c -o fuzz_htp.o 25$CC $CFLAGS -I. -c test/test.c -o test.o 26$CXX $CXXFLAGS fuzz_htp.o test.o -o $OUT/fuzz_htp ./htp/.libs/libhtp.a $LIB_FUZZING_ENGINE -lz -llzma 27 28# builds corpus 29zip -r $OUT/fuzz_htp_seed_corpus.zip test/files/*.t 30