Skip to content

Commit 3a3ffb5

Browse files
committed
Don't print full executable path in error messages.
1 parent e9f9fbf commit 3a3ffb5

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

py-afl-cmin

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/bin/sh
22
export AFL_SKIP_BIN_CHECK=1
33
export PYTHON_AFL_SIGNAL=${PYTHON_AFL_SIGNAL:-SIGUSR1}
4+
prog="${0##*/}"
45
if ! command -v afl-cmin > /dev/null
56
then
67
cat >&2 <<EOF
7-
$0: afl-cmin not found
8+
$prog: afl-cmin not found
89
Is AFL <http://lcamtuf.coredump.cx/afl/> installed?
910
EOF
1011
exit 127

py-afl-fuzz

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22
export AFL_SKIP_CHECKS=1 # AFL << 1.20b
33
export AFL_SKIP_BIN_CHECK=1 # AFL >= 1.20b
44
export AFL_DUMB_FORKSRV=1
5+
prog="${0##*/}"
56
if [ -n "$PYTHON_AFL_DUMB" ]
67
then
78
# shellcheck disable=SC2016
8-
printf '%s: $PYTHON_AFL_DUMB is deprecated; use -n instead\n' "$(basename "$0")" >&2
9+
printf '%s: $PYTHON_AFL_DUMB is deprecated; use -n instead\n' "$prog" >&2
910
set -- -n "$@"
1011
fi
1112
export PYTHON_AFL_SIGNAL=${PYTHON_AFL_SIGNAL:-SIGUSR1}
1213
export PYTHON_AFL_PERSISTENT=1
1314
if ! command -v afl-fuzz > /dev/null
1415
then
1516
cat >&2 <<EOF
16-
$0: afl-fuzz not found
17+
$prog: afl-fuzz not found
1718
Is AFL <http://lcamtuf.coredump.cx/afl/> installed?
1819
EOF
1920
exit 127

py-afl-showmap

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/bin/sh
22
export PYTHON_AFL_SIGNAL=${PYTHON_AFL_SIGNAL:-SIGUSR1}
3+
prog="${0##*/}"
34
if ! command -v afl-showmap > /dev/null
45
then
56
cat >&2 <<EOF
6-
$0: afl-showmap not found
7+
$prog: afl-showmap not found
78
Is AFL <http://lcamtuf.coredump.cx/afl/> installed?
89
EOF
910
exit 127

py-afl-tmin

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/bin/sh
22
export PYTHON_AFL_SIGNAL=${PYTHON_AFL_SIGNAL:-SIGUSR1}
3+
prog="${0##*/}"
34
if ! command -v afl-tmin > /dev/null
45
then
56
cat >&2 <<EOF
6-
$0: afl-tmin not found
7+
$prog: afl-tmin not found
78
Is AFL <http://lcamtuf.coredump.cx/afl/> installed?
89
EOF
910
exit 127

0 commit comments

Comments
 (0)