Skip to content

Commit 6699b50

Browse files
committed
fix writing to stat file
1 parent 89801bb commit 6699b50

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

afl-stat.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ while [ -n "$1" ]; do
1414
SECONDS=`egrep run_time "$1"/fuzzer_stats | awk '{print$3}'`
1515
TIME=`date -u -d "@$SECONDS" +"%T"`
1616
echo "run_clock : $TIME"
17-
} | sort | tee -a "$1"/stats.out
17+
} | sort | tee "$1"/stats.out
1818
LINES=
19-
test -e "$1"/cov/afl-cov.log && LINES=`grep -w lines "$1"/cov/afl-cov.log|tail -n 1|sed 's/.*(//'|sed 's/ .*//'`
20-
echo "coverage : $LINES" | tee -a "$1"/stats.out
19+
test -e "$1"/cov/afl-cov.log && {
20+
LINES=`grep -w lines "$1"/cov/afl-cov.log|tail -n 1|sed 's/.*(//'|sed 's/ .*//'`
21+
echo "coverage : $LINES" | tee -a "$1"/stats.out
22+
}
2123
shift
2224
done

0 commit comments

Comments
 (0)