From 95d739322a2ca1ebf468ada78d4e4dcff0594fc6 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Mon, 3 Aug 2020 19:50:00 +0200 Subject: [PATCH] [libyal] Added libfsntfs to libyal project configuration (#4248) --- projects/libyal/Dockerfile | 1 + projects/libyal/build.sh | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) 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