about summary refs log tree commit diff
path: root/utils/crash_triage/triage_crashes.sh
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-03-24 18:19:45 +0100
committerGitHub <noreply@github.com>2021-03-24 18:19:45 +0100
commitc2b58cff6fa7d6af766cc6f686046d7e043a3977 (patch)
tree0c04cd932d129b45e31fd17c328844295677ca5f /utils/crash_triage/triage_crashes.sh
parent958436be4ba057e8409787e7ff4ddcfa095c46da (diff)
parent6e2a0ef233fc09e8751e2d4cba3298610d8bed2c (diff)
downloadafl++-c2b58cff6fa7d6af766cc6f686046d7e043a3977.tar.gz
Merge pull request #843 from AFLplusplus/tmp
Tmp
Diffstat (limited to 'utils/crash_triage/triage_crashes.sh')
-rwxr-xr-xutils/crash_triage/triage_crashes.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/utils/crash_triage/triage_crashes.sh b/utils/crash_triage/triage_crashes.sh
index bf763cba..c9ca1f79 100755
--- a/utils/crash_triage/triage_crashes.sh
+++ b/utils/crash_triage/triage_crashes.sh
@@ -60,12 +60,12 @@ if
 fi
 
 if [ ! -f "$BIN" -o ! -x "$BIN" ]; then
-  echo "[-] Error: binary '$2' not found or is not executable." 1>&2
+  echo "[-] Error: binary '$BIN' not found or is not executable." 1>&2
   exit 1
 fi
 
 if [ ! -d "$DIR/queue" ]; then
-  echo "[-] Error: directory '$1' not found or not created by afl-fuzz." 1>&2
+  echo "[-] Error: directory '$DIR' not found or not created by afl-fuzz." 1>&2
   exit 1
 fi
 
@@ -90,8 +90,9 @@ for crash in $DIR/crashes/id:*; do
 
   for a in $@; do
 
-    if [ "$a" = "@@" ] ; then
-      use_args="$use_args $crash"
+    if echo "$a" | grep -qF '@@'; then
+      escaped_fname=`echo $crash | sed 's:/:\\\\/:g'`
+      use_args="$use_args `echo $a | sed "s/@@/$escaped_fname/g"`"
       unset use_stdio
     else
       use_args="$use_args $a"