File tree Expand file tree Collapse file tree 4 files changed +1
-42
lines changed
Expand file tree Collapse file tree 4 files changed +1
-42
lines changed Original file line number Diff line number Diff line change 1717FROM gcr.io/oss-fuzz-base/base-builder-rust
1818RUN apt-get update && apt-get install -y make autoconf automake libtool zlib1g-dev liblzma-dev
1919RUN git clone --depth 1 https://github.com/OISF/libhtp.git libhtp
20- RUN git clone --branch main --depth 1 https://github.com/catenacyber/libhtp-rs.git libhtp-rs
2120WORKDIR $SRC
2221COPY build.sh $SRC/
23- COPY multiple.txt $SRC/
Original file line number Diff line number Diff line change 1616# ###############################################################################
1717
1818# build project
19- (
20- cd libhtp-rs
21- export CARGO_BUILD_TARGET=" x86_64-unknown-linux-gnu"
22- cargo fuzz build -O
23- cargo fuzz list | while read i; do
24- # debug for coverage build
25- cp fuzz/target/x86_64-unknown-linux-gnu/release/$i $OUT / || cp fuzz/target/x86_64-unknown-linux-gnu/debug/$i $OUT /
26- done
27- if [ " $SANITIZER " = " address" ]
28- then
29- export RUSTFLAGS=" $RUSTFLAGS -Cpasses=sancov-module -Cllvm-args=-sanitizer-coverage-level=4 -Cllvm-args=-sanitizer-coverage-trace-compares -Cllvm-args=-sanitizer-coverage-inline-8bit-counters -Cllvm-args=-sanitizer-coverage-trace-geps -Cllvm-args=-sanitizer-coverage-prune-blocks=0 -Cllvm-args=-sanitizer-coverage-pc-table -Clink-dead-code -Cllvm-args=-sanitizer-coverage-stack-depth"
30- fi
31- cat $SRC /multiple.txt | while read i; do
32- git grep $i | cut -d: -f1 | uniq | xargs sed -i -e s/$i /" $i " _rs/;
33- done
34- # build in release mode to avoid timeouts
35- cargo build -r
36- cp ./target/x86_64-unknown-linux-gnu/release/libhtp.a ../libhtp-rs.a
37- )
38-
3919cd libhtp
4020sh autogen.sh
4121./configure
@@ -45,9 +25,5 @@ $CC $CFLAGS -I. -c test/fuzz/fuzz_htp.c -o fuzz_htp.o
4525$CC $CFLAGS -I. -c test/test.c -o test.o
4626$CXX $CXXFLAGS fuzz_htp.o test.o -o $OUT /fuzz_htp_c ./htp/.libs/libhtp.a $LIB_FUZZING_ENGINE -lz -llzma
4727
48- $CC $CFLAGS -I. -c test/fuzz/fuzz_diff.c -o fuzz_diff.o
49- $CXX $CXXFLAGS fuzz_diff.o test.o -o $OUT /fuzz_diff ./htp/.libs/libhtp.a ../libhtp-rs.a $LIB_FUZZING_ENGINE -lz -llzma
50-
5128# builds corpus
5229zip -r $OUT /fuzz_htp_seed_corpus.zip test/files/* .t
53- zip -r $OUT /fuzz_diff_seed_corpus.zip test/files/* .t
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11homepage : " https://github.com/OISF/libhtp"
2- language : rust
2+ language : c
33primary_contact : " vjulien@openinfosecfoundation.org"
44auto_ccs :
55- " p.antoine@catenacyber.fr"
66- " jish@openinfosecfoundation.org"
7- - " todd.mortimer@gmail.com"
87
98sanitizers :
109- address
You can’t perform that action at this time.
0 commit comments