mirror of https://github.com/google/oss-fuzz.git
Bash (#1382)
* Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. * Quote the parameter to -name so the shell won't interpret it.
This commit is contained in:
parent
527ef4c7f0
commit
71d91515be
|
@ -45,7 +45,7 @@ if [[ "$FUZZING_ENGINE" = afl ]]; then
|
||||||
export AFL_SKIP_CPUFREQ=1
|
export AFL_SKIP_CPUFREQ=1
|
||||||
# AFL expects at least 1 file in the input dir.
|
# AFL expects at least 1 file in the input dir.
|
||||||
echo input > ${CORPUS_DIR}/input
|
echo input > ${CORPUS_DIR}/input
|
||||||
CMD_LINE="$OUT/afl-fuzz $AFL_FUZZER_ARGS -i $CORPUS_DIR -o $FUZZER_OUT $@ $OUT/$FUZZER"
|
CMD_LINE="$OUT/afl-fuzz $AFL_FUZZER_ARGS -i $CORPUS_DIR -o $FUZZER_OUT $* $OUT/$FUZZER"
|
||||||
elif [[ "$FUZZING_ENGINE" = honggfuzz ]]; then
|
elif [[ "$FUZZING_ENGINE" = honggfuzz ]]; then
|
||||||
# Honggfuzz expects at least 1 file in the input dir.
|
# Honggfuzz expects at least 1 file in the input dir.
|
||||||
echo input > $CORPUS_DIR/input
|
echo input > $CORPUS_DIR/input
|
||||||
|
@ -57,9 +57,9 @@ elif [[ "$FUZZING_ENGINE" = honggfuzz ]]; then
|
||||||
# -P: use persistent mode of fuzzing (i.e. LLVMFuzzerTestOneInput)
|
# -P: use persistent mode of fuzzing (i.e. LLVMFuzzerTestOneInput)
|
||||||
# -f: location of the initial (and destination) file corpus
|
# -f: location of the initial (and destination) file corpus
|
||||||
# -n: number of fuzzing threads (and processes)
|
# -n: number of fuzzing threads (and processes)
|
||||||
CMD_LINE="$OUT/honggfuzz -n 1 --exit_upon_crash -R /tmp/${FUZZER}_honggfuzz.report -W $FUZZER_OUT -v -z -P -f \"$CORPUS_DIR\" $@ -- \"$OUT/$FUZZER\""
|
CMD_LINE="$OUT/honggfuzz -n 1 --exit_upon_crash -R /tmp/${FUZZER}_honggfuzz.report -W $FUZZER_OUT -v -z -P -f \"$CORPUS_DIR\" $* -- \"$OUT/$FUZZER\""
|
||||||
else
|
else
|
||||||
CMD_LINE="$OUT/$FUZZER $FUZZER_ARGS $@ $CORPUS_DIR"
|
CMD_LINE="$OUT/$FUZZER $FUZZER_ARGS $* $CORPUS_DIR"
|
||||||
|
|
||||||
OPTIONS_FILE="${FUZZER}.options"
|
OPTIONS_FILE="${FUZZER}.options"
|
||||||
if [ -f $OPTIONS_FILE ]; then
|
if [ -f $OPTIONS_FILE ]; then
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
|
|
||||||
fuzzers=$(find fuzz -maxdepth 1 -executable -type f -name \fuzz_*)
|
fuzzers=$(find fuzz -maxdepth 1 -executable -type f -name 'fuzz_*')
|
||||||
for f in $fuzzers; do
|
for f in $fuzzers; do
|
||||||
fuzzer=$(basename $f)
|
fuzzer=$(basename $f)
|
||||||
cp $f $OUT/
|
cp $f $OUT/
|
||||||
|
|
Loading…
Reference in New Issue