aboutsummaryrefslogtreecommitdiff
path: root/afl-cmin.bash
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-07-08 13:31:06 +0200
committervanhauser-thc <vh@thc.org>2023-07-08 13:31:06 +0200
commit20dcb40c53811e36a3ace91a66a70cfddc4b3f1c (patch)
tree5a2ad0c8e5692bbc64f81ec06dc5b71a980ee554 /afl-cmin.bash
parentd30272a64e5220e02c9c1cf69925825494a99e80 (diff)
downloadafl++-20dcb40c53811e36a3ace91a66a70cfddc4b3f1c.tar.gz
fix cmin -T
Diffstat (limited to 'afl-cmin.bash')
-rwxr-xr-xafl-cmin.bash7
1 files changed, 7 insertions, 0 deletions
diff --git a/afl-cmin.bash b/afl-cmin.bash
index 1d080491..b326bee8 100755
--- a/afl-cmin.bash
+++ b/afl-cmin.bash
@@ -339,6 +339,13 @@ fi
echo "[*] Are you aware that afl-cmin is faster than this afl-cmin.bash script?"
echo "[+] Found $IN_COUNT files for minimizing."
+if [ -n "$THREADS" ]; then
+ if [ "$IN_COUNT" -lt "$THREADS" ]; then
+ THREADS=$IN_COUNT
+ echo "[!] WARNING: less inputs than threads, reducing threads to $THREADS and likely the overhead of threading makes things slower..."
+ fi
+fi
+
FIRST_FILE=`ls "$IN_DIR" | head -1`
# Make sure that we're not dealing with a directory.