diff --git a/projects/libyal/Dockerfile b/projects/libyal/Dockerfile index 1427b8cec..99c9889e4 100644 --- a/projects/libyal/Dockerfile +++ b/projects/libyal/Dockerfile @@ -33,6 +33,7 @@ RUN git clone --depth 1 https://github.com/libyal/libregf.git libregf RUN git clone --depth 1 https://github.com/libyal/libscca.git libscca RUN git clone --depth 1 https://github.com/libyal/libfsapfs.git libfsapfs +RUN git clone --depth 1 https://github.com/libyal/libfsntfs.git libfsntfs RUN git clone --depth 1 https://github.com/libyal/libbde.git libbde diff --git a/projects/libyal/build.sh b/projects/libyal/build.sh index 0e288d469..c61ee51b9 100755 --- a/projects/libyal/build.sh +++ b/projects/libyal/build.sh @@ -49,11 +49,19 @@ do cp ossfuzz/${FUZZ_TARGET} ${OUT}/${PROJECT}_${FUZZ_TARGET} # Download the test data if supported. - if test -d tests/input/public; + LIBYAL_TYPE_NAME=${FUZZ_TARGET/_fuzzer/}; + + if test -f tests/data/${LIBYAL_TYPE_NAME/}.1; + then + (cd tests/data && zip ${OUT}/${PROJECT}_${FUZZ_TARGET}_seed_corpus.zip ${LIBYAL_TYPE_NAME}.*) + + elif test -d tests/input/public; then (cd tests/input/public && zip ${OUT}/${PROJECT}_${FUZZ_TARGET}_seed_corpus.zip *) + else - (cd tests/data && zip ${OUT}/${PROJECT}_${FUZZ_TARGET}_seed_corpus.zip ${FUZZ_TARGET/_fuzzer/}.*) + echo "Missing test data for seed corpus." + exit 1 fi done done