diff options
-rw-r--r-- | projects/irssi/Dockerfile | 4 | ||||
-rw-r--r-- | projects/irssi/build.sh | 23 | ||||
-rw-r--r-- | projects/irssi/theme-load-fuzz.dict | 9 |
3 files changed, 22 insertions, 14 deletions
diff --git a/projects/irssi/Dockerfile b/projects/irssi/Dockerfile index 1477afdf..c041fc5a 100644 --- a/projects/irssi/Dockerfile +++ b/projects/irssi/Dockerfile @@ -16,8 +16,8 @@ FROM gcr.io/oss-fuzz-base/base-builder MAINTAINER joseph.bisch@gmail.com -RUN apt-get update && apt-get install -y make autoconf automake libtool pkg-config libglib2.0-dev libncurses5-dev libssl-dev openssl lynx +RUN apt-get update && apt-get install -y make autoconf automake libtool pkg-config libglib2.0-dev libncurses5-dev libssl-dev openssl lynx wget RUN git clone https://github.com/irssi/irssi WORKDIR irssi -COPY build.sh *.options $SRC/ +COPY build.sh *.options *.dict $SRC/ diff --git a/projects/irssi/build.sh b/projects/irssi/build.sh index 1756acbf..95a42516 100644 --- a/projects/irssi/build.sh +++ b/projects/irssi/build.sh @@ -24,7 +24,7 @@ export ASAN_OPTIONS=detect_leaks=0 make clean make "-j$(nproc)" CFLAGS="-static -DSUPPRESS_PRINTF_FALLBACK $CFLAGS" CXXFLAGS="-static $CXXFLAGS" -# now build irssi-fuzz itself +# now build all fuzz targets export GLIB_CFLAGS="$(pkg-config --static --cflags glib-2.0)" export GLIB_LIBS="$(pkg-config --static --libs glib-2.0)" @@ -39,16 +39,15 @@ FE_COMMON_LIBS="$FE_COMMON_LIBS src/fe-common/core/libfe_common_core.a" FE_FUZZ_CFLAGS="-I. -Isrc -Isrc/core/ -Isrc/irc/core/ -Isrc/fe-common/core/" -${CXX} ${CXXFLAGS} -DHAVE_CONFIG_H -lFuzzingEngine ${FE_FUZZ_CFLAGS} ${GLIB_CFLAGS} \ - src/fe-fuzz/irssi.o src/fe-fuzz/module-formats.o -lm \ - -Wl,-Bstatic ${FE_COMMON_LIBS} ${CORE_LIBS} -lssl -lcrypto ${GLIB_LIBS} -lgmodule-2.0 -lz \ - -Wl,-Bdynamic -o $OUT/irssi-fuzz +for target in irssi irc/core/event-get-params fe-common/core/theme-load; do + ${CXX} ${CXXFLAGS} -DHAVE_CONFIG_H -lFuzzingEngine ${FE_FUZZ_CFLAGS} ${GLIB_CFLAGS} \ + src/fe-fuzz/${target}.o src/fe-fuzz/module-formats.o -lm \ + -Wl,-Bstatic ${FE_COMMON_LIBS} ${CORE_LIBS} -lssl -lcrypto ${GLIB_LIBS} -lgmodule-2.0 -lz \ + -Wl,-Bdynamic -o $OUT/${target##*/}-fuzz +done -# now build event-get-params-fuzz +mkdir $SRC/theme-load-fuzz_corpus +wget -r -P $SRC/theme-load-fuzz_corpus -nH --cut-dirs=100 -np -l 1 -A theme https://irssi-import.github.io/themes/ +zip -j $OUT/theme-load-fuzz_seed_corpus.zip $SRC/theme-load-fuzz_corpus/* -${CXX} ${CXXFLAGS} -DHAVE_CONFIG_H -lFuzzingEngine ${FE_FUZZ_CFLAGS} ${GLIB_CFLAGS} \ - src/fe-fuzz/irc/core/event-get-params.o src/fe-fuzz/module-formats.o -lm \ - -Wl,-Bstatic ${FE_COMMON_LIBS} ${CORE_LIBS} -lssl -lcrypto ${GLIB_LIBS} -lgmodule-2.0 -lz \ - -Wl,-Bdynamic -o $OUT/event-get-params-fuzz - -cp $SRC/*.options $OUT/ +cp $SRC/*.options $SRC/*.dict $OUT/ diff --git a/projects/irssi/theme-load-fuzz.dict b/projects/irssi/theme-load-fuzz.dict new file mode 100644 index 00000000..928b2a79 --- /dev/null +++ b/projects/irssi/theme-load-fuzz.dict @@ -0,0 +1,9 @@ +"{" +"}" +"\"" +";" +"=" +"formats" +"replaces" +"abstracts" +"timestamp" |