diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-10-29 21:22:05 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-10-29 21:22:05 +0100 |
commit | 7a6a7f54d1f27c6b3520fe8cffebeebc6c272ca0 (patch) | |
tree | 3e17f8969de279e8f73055f306b731d0f096e357 /src/plugins/fuzz_default.sh | |
parent | 161aecb855156aadbf167b31341614807ca336ca (diff) | |
download | libextractor-7a6a7f54d1f27c6b3520fe8cffebeebc6c272ca0.tar.gz libextractor-7a6a7f54d1f27c6b3520fe8cffebeebc6c272ca0.zip |
fix #6613
Diffstat (limited to 'src/plugins/fuzz_default.sh')
-rwxr-xr-x | src/plugins/fuzz_default.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/plugins/fuzz_default.sh b/src/plugins/fuzz_default.sh index 8b64539..67292cf 100755 --- a/src/plugins/fuzz_default.sh +++ b/src/plugins/fuzz_default.sh | |||
@@ -14,6 +14,17 @@ then | |||
14 | bindir="$bindir/bin" | 14 | bindir="$bindir/bin" |
15 | fi | 15 | fi |
16 | 16 | ||
17 | if test -x `which zzuf` | ||
18 | then | ||
19 | exit 77 | ||
20 | fi | ||
21 | |||
22 | if test -x `which timeout` | ||
23 | then | ||
24 | TIMEOUT=timeout 15 | ||
25 | else | ||
26 | TIMEOUT="" | ||
27 | fi | ||
17 | 28 | ||
18 | for file in $testdatadir/test* | 29 | for file in $testdatadir/test* |
19 | do | 30 | do |
@@ -26,11 +37,11 @@ do | |||
26 | do | 37 | do |
27 | echo "file $file seed $seed" | 38 | echo "file $file seed $seed" |
28 | zzuf -c -s $seed cat "$file" > "$tmpfile" | 39 | zzuf -c -s $seed cat "$file" > "$tmpfile" |
29 | if ! "$bindir/extract" -i "$tmpfile" > /dev/null | 40 | if ! "$TIMEOUT $bindir/extract" -i "$tmpfile" > /dev/null |
30 | then | 41 | then |
31 | echo "$tmpfile with seed $seed failed" | 42 | echo "$tmpfile with seed $seed failed" |
32 | mv $tmpfile $tmpfile.keep | 43 | mv $tmpfile $tmpfile.keep |
33 | ret=1 | 44 | ret=1 |
34 | fi | 45 | fi |
35 | seed=`expr $seed + 1` | 46 | seed=`expr $seed + 1` |
36 | done | 47 | done |