about summary refs log tree commit diff
path: root/afl-plot
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-07-05 13:48:14 +0200
committervan Hauser <vh@thc.org>2020-07-05 13:48:14 +0200
commit8644c42482f02f7cd86decbc00ba29aa9c0ce9c0 (patch)
tree6b36db72aa859217d378863512ed11b7253f164e /afl-plot
parent95fd080ca17743717d38b8b002d30b09a5a16748 (diff)
downloadafl++-8644c42482f02f7cd86decbc00ba29aa9c0ce9c0.tar.gz
check for enough plot data
Diffstat (limited to 'afl-plot')
-rwxr-xr-xafl-plot9
1 files changed, 9 insertions, 0 deletions
diff --git a/afl-plot b/afl-plot
index 1074552a..66c16870 100755
--- a/afl-plot
+++ b/afl-plot
@@ -68,6 +68,15 @@ if [ ! -f "$inputdir/plot_data" ]; then
 
 fi
 
+LINES=`cat "$inputdir/plot_data" | wc -l`
+
+if [ "$LINES" -lt 3 ]; then
+
+  echo "[-] Error: plot_data carries too little data, let it run longer." 1>&2
+  exit 1
+
+fi
+
 BANNER="`cat "$inputdir/fuzzer_stats" 2> /dev/null | grep '^afl_banner ' | cut -d: -f2- | cut -b2-`"
 
 test "$BANNER" = "" && BANNER="(none)"